Closed
Bug 25811
Opened 25 years ago
Closed 24 years ago
performance problems dragging gfx scrollbars
Categories
(Core :: XUL, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: dbaron, Assigned: eric)
References
Details
(Keywords: perf, platform-parity)
I did some profiling using jprof of dragging with gfx scrollbars. That is, I
loaded my homepage, started profiling, dragged the slider from top to bottom to
top repeatedly, and quit. I did this in a debug build, so the data could be a
little bit suspect. The full data are at
http://dbaron.student.harvard.edu/u/david/mozperf/scrolling_gfx_withmyfix.html
(when my computer is on).
The basic problem seems to be that you're using an attribute to store the
position of the GFX scrollbar, and this causes a re-resolution of the style
context (since the matching attribute selectors could change). In the above
profile, most of the time is divided between the following three functions,
which I think are mutually exclusive (note that you can use the # in the first
column as an ID selector at the end of the URL for the profile data):
189730 0 46 nsSliderFrame::AttributeChanged
177467 0 104 FrameManager::ComputeStyleChangeFor
178244 0 80 nsGfxScrollFrameInner::AttributeChanged
It seems to me (from browsing the profile data) that these three things are,
respectively:
* repainting the scrollbar
* re-resolving the style context
* repainting the document
I think they're mutually exclusive since they are a division of the time spent
within
190332 2 232 nsDocument::AttributeChanged
which is slightly more than 80% of the time in the profile.
If that's true, then you're spending an awful lot of time doing something I
don't think you need to do.
Comment 1•25 years ago
|
||
assigned to evaughan as p4 m18, but I doubt we'd hold any milestone for this. I
will consider reevaluating this if it is perceived to be a performance problem
in optimized builds.
Assignee: trudelle → evaughan
Priority: P3 → P4
Target Milestone: M18
Comment 2•25 years ago
|
||
dbaron: this is a good find. maybe we should whack a special-purpose API onto
the scrollbar to avoid using attributes to communicate the scrollbar position?
hyatt, whatdya think?
Comment 3•25 years ago
|
||
Let's make these properties instead of attributes.
Reporter | ||
Comment 4•25 years ago
|
||
For the record, profiling with an optimized build shows roughly the same
results:
http://dbaron.student.harvard.edu/~david/mozperf/scroll-homepage-drag.html#82465
http://dbaron.student.harvard.edu/~david/mozperf/scroll-homepage-drag.html#85882
The key bits are that the time (214 hits of 259 on main) in
nsXULElement::SetAttribute is split between:
73666 1 91 nsGfxScrollFrameInner::AttributeChanged
72911 1 78 FrameManager::ComputeStyleChangeFor
85264 1 43 nsSliderFrame::AttributeChanged
This is showing the results of the smooth scrolling that is implemented on GFX
scrollbars - since very little is painted each step of the scrolling, the
performance of other things (the scrollbar itself) matters.
Comment 5•25 years ago
|
||
reassigning to me, M14 beta1. scrolling is too slow to use on pages that
contain anything more than text. don't even get me started on mailnews
scrolling on linux.
Reporter | ||
Comment 6•25 years ago
|
||
I would think fixing this problem would help by the same *amount* on all pages
(rather than proportion). (I still think it's worth fixing, and probably not
too hard.)
Could you give an example of a page where scrolling is particularly slow?
(Profile data could show something else interesting...)
Reporter | ||
Comment 7•25 years ago
|
||
Actually, ignore my previous comment. I think the scrollbars are part of the
document, not the chrome, so it would be the document's style context that's
relevant...
Comment 8•25 years ago
|
||
i'm doing lots of quantifying on all of this so i'm on top of the problems.
Status: NEW → ASSIGNED
Comment 9•25 years ago
|
||
pdt would like more data please
Comment 11•25 years ago
|
||
this doesn't need to be fixed for beta1. if the bug this one depends on gets
fixed, this shouldn't matter enough for performance. taking off the beta1
list. let me know if you disagree with this and I'll put it back.
Comment 12•25 years ago
|
||
hyatt, you can fix this right? :)
Assignee: pavlov → hyatt
Status: ASSIGNED → NEW
Comment 13•25 years ago
|
||
*IGNORE* - massive spam changing open XPToolkit bug's QA contact to
jrgm@netscape.com
QA Contact: paulmac → jrgm
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M14 → M15
Comment 14•25 years ago
|
||
claudius observed that scrolling degrades dramatically on Mac between view
manager 1 and 2. This seems to be dominating the slowdown on Mac/Linux.
Throwing to beard for analysis.
Assignee: hyatt → beard
Status: ASSIGNED → NEW
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 17•25 years ago
|
||
Bulk moving to M16
Updated•25 years ago
|
Target Milestone: M15 → M16
Comment 18•25 years ago
|
||
I tested scrolling performance using view manager 1 and view manager 2 on WINNT,
Mac, and Linux. I don't see any difference in performance. I do see a difference
when native scrollbars are used instead of gfx scrollbars. The native scrollbars
are faster.
Reassigning to evaughan.
Assignee: kmcclusk → evaughan
Status: ASSIGNED → NEW
Comment 19•25 years ago
|
||
*** Bug 32491 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 20•24 years ago
|
||
Mike,
Does you fix to style fix this? Can you confirm it?
Status: NEW → ASSIGNED
Sure seems faster to me. Mr Baron, are you satisfied?
Comment 22•24 years ago
|
||
Moving all bugs that are not dogfood+, nsbeta2+,features, or nsbeta2- to M21
Target Milestone: M16 → M21
Assignee | ||
Comment 23•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 25•24 years ago
|
||
Oops. Reopening as I marked wrong bug. Sorry for the spam.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment 26•24 years ago
|
||
resolving as fixed per evaughan's comment.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•