Closed
Bug 49175
Opened 25 years ago
Closed 23 years ago
View event processing needs to be made fast, robust and moved into the view manager
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
mozilla1.0.1
People
(Reporter: alla, Assigned: roc)
References
Details
(Keywords: perf)
Attachments
(3 files)
4.01 KB,
patch
|
Details | Diff | Splinter Review | |
1.77 KB,
patch
|
Details | Diff | Splinter Review | |
15.52 KB,
patch
|
Details | Diff | Splinter Review |
While profiling to fix bug 39573 i found some slow code in
nsView::HandleEvent(). It basically looped numChildren times calling
GetChild(i), and each GetChild looped i times to find the child.
I've written a patch that fixes this and two more like it. I'll attach it. It
was a major helper in getting performance up on bug 39573.
Assignee | ||
Comment 2•25 years ago
|
||
The paint patch should be unnecessary. As far as I know, nsViewManager2 always
uses NS_VIEW_FLAG_JUST_PAINT, so in fact all the code in nsView relating to
painting of child views is dead code. I've actually removed that code from my
tree and put in an assertion in case it would ever be used, and everything works
just fine... This code should just be removed.
The other loop changes look good.
If Kevin doesn't want this bug, he can assign it to me, and if I get review and
approval I can check the code in.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•25 years ago
|
||
Robert is correct, nsViewManager2 always passes NS_VIEW_FLAG_JUST_PAINT. The
other logic which walks the view tree pre-dates the use of a display list. Its
been left around simply for debugging.
Added perf keyword.
The other part of the patch looks good.
Status: NEW → ASSIGNED
Keywords: perf
Assignee | ||
Comment 4•25 years ago
|
||
Adding patch keyword.
Can we get rid of the unused painting code? It confuses the reader, and at this
point it's basically just wrong.
Keywords: patch
Comment 5•25 years ago
|
||
Sure. I no longer use it for debugging purposes.
There are more of these, in nsScrollPortView.cpp and nsScrollingView.cpp. I'm
attaching patches for these too.
Assignee | ||
Comment 9•25 years ago
|
||
Assignee | ||
Comment 10•25 years ago
|
||
OK, can I have review and approval for patch 13142 please?
Status: NEW → ASSIGNED
Comment 11•25 years ago
|
||
Hoping kmcclusk can give an r=, or find someone who will.
/be
Comment 12•25 years ago
|
||
I reviewed the changes and they look good.
r=kmcclusk@netscape.com
Comment 13•25 years ago
|
||
Great work, a=brendan@mozilla.org.
/be
Assignee | ||
Comment 14•25 years ago
|
||
Fix checked in. Thanks Alex, Brendan, Kevin!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 15•25 years ago
|
||
alex mentions in bug 39753 that this bug's fix has been reverted. If that's the
case shouldn't this bug be reopened?
Comment 16•25 years ago
|
||
That should be bug 39573.
Assignee | ||
Comment 17•25 years ago
|
||
Reopening. To truly fix this bug is actually quite difficult, and probably won't
happen soon.
My summary from bug 50335 discussion:
View event handling must be able to deal with the deletion of any arbitrary view
during each event handler call. The best way to achieve this seems to be to move
the event handling logic out of nsView::HandleEvent and up into nsViewManager. I
have a patch in my tree that does this and stops the crashes but does not
resolve all the problems, namely:
-- Some event processing can be dropped if a view is destroyed during event
handling, even if the content is still around and would normally receive the
event (could cause VERY RARE bugs)
-- Event processing needs to be reworked to handle Z-order properly, using a
display-list-like mechanism.
A general "event handling in views" rewrite is needed. I will produce one, but
maybe not soon :-).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: There are some O(n^2) algorithms in nsView.cpp → View event processing needs to be made fast, robust and moved into the view manager
Assignee | ||
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 18•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Assignee | ||
Comment 19•23 years ago
|
||
*** This bug has been marked as a duplicate of 96832 ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•