I'm looking into ways of somehow throttling the CPU usage in inactive
XUL windows (and browsers in them) in our xulrunner-using application.
There is a rumor that Firefox can somehow do this with inactive tabs.
Is that true? I haven't been able to find anything about it so far.
I know this will probably become a lot easier once the out-of-process
stuff lands, but if anyone has suggestions on how to accomplish this
with xulrunner 1.9.1 I'd appreciate it.
Thanks,
James
What Firefox does it based on a hack that tests widget visibility.
We really need to replace that hack with an API, as described in
https://bugzilla.mozilla.org/show_bug.cgi?id=465216
https://bugzilla.mozilla.org/show_bug.cgi?id=343515
If you did something that hid widgets (e.g., put your browser inside
a deck, and switched to a different element in the deck), you could
ride along on this.
That said, I think it doesn't really throttle very much; the big
performance win is that it suppresses resizing of all the hidden
tabs until you switch to them.
(At some point in the near future I'd like to hook both the
hiddenness notifications and more things that are on timers up to
nsRefreshDriver, and thus suppress a good bit more.)
-David
--
L. David Baron http://dbaron.org/
Mozilla Corporation http://www.mozilla.com/
Thanks for the tip! We never resize the browser or window at all, so
maybe it won't mean much for us. I'll give it a shot.
Thanks,
James