Closed
Bug 49300
Opened 26 years ago
Closed 26 years ago
gratuitous gdk_window_get_events() in nsWindow::CreateNative()
Categories
(Core :: XUL, defect, P3)
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: alla, Assigned: rods)
References
Details
(Keywords: perf, Whiteboard: [nsbeta3+]Fix in hand)
Attachments
(4 files)
|
1.05 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.87 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.97 KB,
patch
|
Details | Diff | Splinter Review | |
|
674 bytes,
patch
|
Details | Diff | Splinter Review |
I'm looking at profiling hotspots from bug 39573. One of them is
nsWindow::CreateNative() calling gdk_window_get_events(). This means waiting for
a Xserver response stalling the Xserver communications. Reading the events is
done so that some extra events can be added. This is better done by
gtk_widget_add_events() which doesn't do the server roundtrip.
I'll append a patch. This helps bug 39573 a lot, especially when displaying
remote.
Attached a patch and added patch and perf keywords.
Just a note. The reason this is a performance improvement is that
gtk_widget_add_event() doesn't call gdk_window_get_events() for non-realized
windows.
Updated•26 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•26 years ago
|
||
this patch unfortunatly doesn't really do anything... gtk_widget_add_events
simply calls gdk_window_set_events(window, gdk_window_get_events(window) |
events)
Sorry sorry. I'm a moron. I'll attach a new patch that really fixes this.
(This time i double checked the code and the jprof output.)
Pavlov, what's up with the status on this one?
I've got it in my tree for a long time now, and it works well.
Comment 9•26 years ago
|
||
Two comments about this patch
Is AddToEventMask() used anywhere else? If it isn't remove it. If it is it
might be a hotspot for those widgets.
Also, at the end of this patch you do:
if (mMozArea) {
...
gdk_window_set_events(mShell->window, mask);
shouldn't that be:
gdk_window_set_events(mMozArea->window, mask);
| Reporter | ||
Comment 10•26 years ago
|
||
It seems to be used a lot from other widgets. But since they are not used much
anymore i dont think it is a problem.
The gdk_window_set_events(mMozArea->window, mask) is probably more correct yes.
I'm cooking up a new patch.
| Reporter | ||
Comment 11•26 years ago
|
||
| Reporter | ||
Comment 12•26 years ago
|
||
Ok. New fix attached. If i can get some r= loving i could try checking this in
myself.
Comment 13•26 years ago
|
||
sorry for taking so long. r=pavlov. please go ahead and check this in. (or I
can if you'd prefer)
| Assignee | ||
Comment 14•26 years ago
|
||
I'll take the bug, because I will be checking in the fix with 39573. Nominating
for nsbeta3 because this and the fix to 39573 speed mozilla up quite a bit.
Assignee: pavlov → rods
Keywords: nsbeta3
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Summary: gratious gdk_window_get_events() in nsWindow::CreateNative() → gratuitous gdk_window_get_events() in nsWindow::CreateNative()
Whiteboard: Fxi in hand
| Assignee | ||
Comment 16•26 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta3+]Fxi in hand → [nsbeta3+]Fix in hand
| Reporter | ||
Comment 17•26 years ago
|
||
| Assignee | ||
Comment 18•26 years ago
|
||
It's checked in now, thanks.
Comment 19•26 years ago
|
||
versions 1.301 and 1.303 in the tree contain all patches mentioned here. Marking
VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•