Closed
Bug 70211
Opened 24 years ago
Closed 24 years ago
nsContainerFrame::PositionChildViews does a recursive walk of the frame tree when positioning views
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: kmcclusk, Assigned: kmcclusk)
References
Details
(Keywords: topperf, Whiteboard: Waiting for review/super-review)
Attachments
(5 files)
3.14 KB,
patch
|
Details | Diff | Splinter Review | |
5.92 KB,
patch
|
Details | Diff | Splinter Review | |
5.76 KB,
patch
|
Details | Diff | Splinter Review | |
5.62 KB,
patch
|
Details | Diff | Splinter Review | |
6.98 KB,
patch
|
Details | Diff | Splinter Review |
The logic in nsContainerFrame::PositionChildViews does a recursive walk of the
frame tree to position the views of descendants. It should be much more efficent
to get the child views and their associated frames and determine whether the
frames are descendants of the container frame instead. There are typically just
a few views per page, while there can be a large number of frames.
I commented out the logic in nsContainerFrame::PositionChildViews and saw a 4%
page load improvement running jrgm's perf test. This is definitely worth
investigating.
Assignee | ||
Comment 1•24 years ago
|
||
Added topperf keyword and mozilla0.9 milestone
Keywords: topperf
Target Milestone: --- → mozilla0.9
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•24 years ago
|
||
Updated status whiteboard
Whiteboard: Looking for a way to detect if a view is owned by a 'secret' hidden frame. ETA (2/30)
Comment 5•24 years ago
|
||
ETA (2/30) for this bug? So it will never happens?
PS We have max the 29 february in grigorian calender... :)
Assignee | ||
Comment 6•24 years ago
|
||
Darn!, almost got away with it :)
Whiteboard: Looking for a way to detect if a view is owned by a 'secret' hidden frame. ETA (2/30) → Looking for a way to detect if a view is owned by a 'secret' hidden frame. ETA (3/2)
Assignee | ||
Comment 7•24 years ago
|
||
Setting milestone to mozilla0.8.1
Target Milestone: mozilla0.9 → mozilla0.8.1
Assignee | ||
Comment 8•24 years ago
|
||
Assignee | ||
Comment 9•24 years ago
|
||
Updated status.
Keywords: patch
Whiteboard: Looking for a way to detect if a view is owned by a 'secret' hidden frame. ETA (3/2) → testing patch to make sure there are no regressions
Comment 10•24 years ago
|
||
I would prefer it if you put the code that tells menu popups not to sync up in
the nsMenuPopupFrame constructor instead of in the CSS frame constructor.
Also, test the heck out of this before landing.
sr=hyatt
Assignee | ||
Comment 11•24 years ago
|
||
Ok. I'll move that code to the popup's constructor. (I had it there to begin
with, but it looked like CSSFrameConstructor was setting frame state for other
frames. I agree it's better to move as much as possible out of
CSSFrameConstructor, since it has too much in it to begin with ;-)).
I won't be landing this for several days. I'll test on WIN32, Linux, and Mac
before checking this in. I've been running for two days with it on WIN32 and so
far I haven't seen any problems.
Comment 12•24 years ago
|
||
r=attinasi - I will be applying and testing this starting Thursday as well, but
the code looks fine to me.
Comment 13•24 years ago
|
||
Test cases where menus need to be pulled back onscreen by moving your window to
the edge of your monitor.
Assignee | ||
Comment 14•24 years ago
|
||
Comment 15•24 years ago
|
||
Just for info. When i did profile with eazel profiler in page
http://www.w3.org/TR/css3-roadmap/ (bug #68821) i see
nsContainerFrame::PositionChildViews called 1013136 times and taken about
4sec when just mousing over page once (enter/leave page).
Maybe that is good test page? Maybe add depency to that bug?
Assignee | ||
Comment 16•24 years ago
|
||
I tested the XUL Menus as Dave suggested. I have not seen any regressions as the
result of my patch, but it should be noted that there are two "pre existing"
problems with popup menus that cause the popup's submenus to be positioned
incorrectly
bug 71521
bug 61662
I have tested WIN32, Linux, and Mac and I have not seen any regressions. I'm
planning on checking in the patch this weekend.
Assignee | ||
Comment 17•24 years ago
|
||
Patch checked in.
Marking fixed.
peterson: This can only be verified by looking at the code.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 18•24 years ago
|
||
Not sure if this checkin caused that but on Linux-2001031408 Ctrl+/Crtl- started
to work incorectly - when I press those key combinations text is drawn in bigger
or smaller font but at the same place that it originally was. This causes text
drawn on another text or forming blank spaces.
Assignee | ||
Updated•24 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 19•24 years ago
|
||
I have a new patch, which should be provide better performance than the last
past that was checked in.
I am reopening this bug until we determine whether the new patch has any impact
on page load times.
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.8.1 → mozilla0.9
Assignee | ||
Comment 20•24 years ago
|
||
Comment 21•24 years ago
|
||
Simpler and much better design in this patch...
Some minor typos:
+// If this bit is set the frame does not have a descendant with a view
+#define NS_FRAME_HAS_CHILD_WITH_VIEW 0x00040000
It think you meant _does have_ ?
+ PRBool isSet= ((frameState & NS_FRAME_HAS_CHILD_WITH_VIEW) ==
NS_FRAME_HAS_CHILD_WITH_VIEW);
+ if (! isSet) {
Why bother with the temp. variable. Just testing the stuff is ok (and readable).
// Remember our view
aFrame->SetView(aPresContext, view);
+ if (view) {
+ // Let all of the containing frames know they have a child with a view
The test doesn't seem necessary here since earlier in the code 'view->' is used.
Searched and saw the above mentioned Ctrl+/- bug 72181 which seems to be a
separate issue.
Assignee | ||
Comment 22•24 years ago
|
||
Assignee | ||
Comment 23•24 years ago
|
||
jrgm ran his performance tests on all three platforms with the equivalent of the
new patch, but he did not see any performance improvement.
This patch should improve performance when loading large documents however.
attinasi@netscape.com and I saw that 50% of the time when reflowing a large text
document is spent in PositionChildViews. The new patch should cut out 80% of
that time.
Assignee | ||
Comment 24•24 years ago
|
||
Updated status
Whiteboard: testing patch to make sure there are no regressions → Waiting for review/super-review
Comment 25•24 years ago
|
||
(tiny note: I ran on win2k. I didn't run on mac or linux).
Comment 26•24 years ago
|
||
r=karnaze
Assignee | ||
Comment 27•24 years ago
|
||
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 28•24 years ago
|
||
I had approved this prior to the checkin - sr=attinasi
You need to log in
before you can comment on or make changes to this bug.
Description
•