[Companion] Menu-button fix

Brian mozdev at bkennelly.net
Thu Sep 16 01:13:01 EDT 2004


Brian Erst wrote:

> Jim -
> 
> This is probably due to the timeout. Companion uses window
> timeouts to refresh itself (essentially, every four minutes
> the toolbar destroys itself and rebuilds itself by
> re-requesting the Yahoo! feed). The alert isn't really a
> "push", it's in a polling loop.
> 
> We could drop the alert interval, but based on the current 
> implementation, I would guess that would degrade performance
> of the browser if it was too frequent (destroying and
> rebuilding the XUL elements takes some time - though I think
> there is some logic to prevent a total rebuild).
> 
> 
> 
I have some changes that reduce the overhead of processing
alerts, and am trying it with a 60 second delay. So far, so good.

Change the URL in yahootoolbarOverlay.js>refreshAlert
    from "http://update.companion.yahoo.com/slv/v4"
    to "http://update.companion.yahoo.com/slv/v4/not"
The result is that it will only load the Alerts menu! It is
less than a hundred bytes vs. ~28K for the full toolbar.
(I also changed the timeout to 60000 milliseconds).

If you do that, you must also change a line in
class_NewMailNotify.js>parse
    from 'var toolbarLine = this.lines[2];'
    to 'var toolbarLine = this.lines[1];'

After some more testing, I will send it out.



More information about the Companion mailing list