Closed
Bug 89900
Opened 23 years ago
Closed 23 years ago
[xlib] nsAppShell::Run() is inefficient
Categories
(Core :: XUL, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
Details
Attachments
(4 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Looking at Xlib-toolkit's nsAppShell::Run() - it looks inefficient for me.
1. After processing some events |nsWindow::UpdateIdle(nsnull);XFlush(mDisplay);|
is called - even if new events are already in the queue. BAD.
2. XFlush(). BAD. Is that neccesary ? (See [1])
3. It may be better to use XEventsQueued(display, QueuedAfterReading); instead
of XPending()(=XEventsQueued(display, QueuedAfterFlush);)
4. Is there a fix for...
-- snip --
// FIXME!!!
// Block for events. For moment, use a artificial timer to
// only block for a certain amount of time.
// When properly fixed, this delay should be cur_time_ptr
// and we need a way to detect an Xt event.
-- snip --
?
Let's keep all xlib bugs with [xlib] in front of it since they won't make a
component for it to make it easier to search for things
adding keywords, bug dependency
Blocks: 79119
Keywords: helpwanted
Summary: Xlib-toolkit's nsAppShell::Run() is inefficient... → [xlib] nsAppShell::Run() is inefficient
Comment 2•23 years ago
|
||
this is so out of our domain. blake says blizzard should get this (though i don't
know why)
Assignee: trudelle → blizzard
Assignee | ||
Comment 3•23 years ago
|
||
Stealing this bug from blizzard...
Assignee: blizzard → Roland.Mainz
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
The patch looks nice... but I would perfer to move all this stuff into the hands
of libXt - it has far more efficient code for handling all this stuff.
the patch does look nice.
gisburn: whats wrong with using XPending() etc to check for events? No reason to
keep that in Xt code.
Also by looking at nsAppShell in GTK they dont even poll Xt events there, they
must handle that somewhere else?
Assignee | ||
Comment 7•23 years ago
|
||
1. libXt keeps events in-order. Our current code polls each source of events
with a while() loop and then steps to the next source of events. This is bad as
this destroys interactivity if one source creates tons of events. BAD.
(this may be one source of trouble with ns4.x plugins, too...).
2. libXt code is better than ours... :-)
3. XPending() can trigger an internal XFlush() if the source does not have anya
events. BAD.
----
pocemit:
I didn't look into details how ns4.x plugin stuff is working. I assume they are
doing that somewhere else... or they're registering some sort of GTK+-"callback"
to handle that automagically.
Assignee | ||
Comment 8•23 years ago
|
||
Assignee | ||
Comment 9•23 years ago
|
||
Filed prototype patch which uses libXt event loop instead of our own one.
The code works fine except one flaw: I had to add a 2nd timeout to get the whole
thing working - but I am not sure why this is required. Any ideas ?
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
Ignore my previous question... filed better patch which solves this issue.
Requesting r=/sr= ... :-)
Comment 12•23 years ago
|
||
Assignee | ||
Comment 13•23 years ago
|
||
r=roland.mainz@informatik.med.uni-giessen.de for that patch.
Assignee | ||
Updated•23 years ago
|
Whiteboard: seeking r=/sr= → seeking sr=
Comment 14•23 years ago
|
||
You're pure Xlib toolkit is not longer just Xlib. :)
sr=blizzard
Assignee | ||
Comment 15•23 years ago
|
||
blizzard:
It least it's free of GDK/GTK+/Qt. That's all re need... :-)
Thanks!
----
CC:'ing mkaply@us.ibm.com for checkin, please...
Whiteboard: seeking sr=
Comment 16•23 years ago
|
||
checked in:
Checking in nsAppShell.cpp;
/cvsroot/mozilla/widget/src/xlib/nsAppShell.cpp,v <-- nsAppShell.cpp
new revision: 1.68; previous revision: 1.67
done
Checking in nsAppShell.h;
/cvsroot/mozilla/widget/src/xlib/nsAppShell.h,v <-- nsAppShell.h
new revision: 1.22; previous revision: 1.21
done
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 17•23 years ago
|
||
May God have mercy on us all. The 212 bug spam-o-rama is Now!
QA Contact: aegis → jrgm
You need to log in
before you can comment on or make changes to this bug.
Description
•