Closed Bug 155624 Opened 23 years ago Closed 10 years ago

Toolbar item state is updated every mouse move in the browser window

Categories

(Camino Graveyard :: Toolbars & Menus, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: sfraser_bugs, Unassigned)

Details

If you put an NSLog in validateToolbarItem in BrowserWindowController, you'll see that it gets called for every mouse move in the browser window, which seems like overkill, and could hurt performance. Automatic updating is supposed to happen on 'every user event' according to the docs, but to do it on mouse move seems extreme. We might have to move to manual item updating.
This is probably why: [[self window] setAcceptsMouseMovedEvents: YES];
Blocks: 147975
This is "normal" behaviour as can be easily verified by modifying the SimpleToolbar example project (I consider it more like a bug/misfeature in NSToolbar, but in any case, it is not Chimera's fault). As a consequence, one has to make sure that validateToolbarItem is implemented in a efficient way (I did so for my own projects), e.g. by caching the information. I looked at your validateToolbarItem, but since I don't know to much about Chimera's inner working, I can't judge how "efficient" the current code is.
is there anything at all we can do about this? subclass the toolbar so that it doesn't do it? we seem to force validation when we need to manually anyway.
Target Milestone: --- → Chimera0.5
Automatic toolbar validation is really nice from a development standpoint. I'd like to keep it this way, if we can limit the events it validates with. While in my programs I've cached the info necessary to create a toolbar item (namely, the image), caching the enabled state is no better than just telling the toolbar to update manually, since we'll need to activly mark one or the other as invalid, either way. I'll look further into this.
Can we restrict mouse moves to the content rect, rather than the entire window?
After running it through Sampler, I don't think this is an issue at all. The validateToolbarItems method is really efficent, and the time spent in it is insignificant compared to mozilla's mouseMoved actions.
Status: NEW → ASSIGNED
Target Milestone: Chimera0.5 → Future
QA Contact: winnie → sairuh
No longer blocks: 147975
Mike could you take a look at this?
Ping. Mike, Simon, can someone look at this?
Per comment 6, is this even worth bothering with any more?
Assignee: mikepinkerton → nobody
Status: ASSIGNED → NEW
QA Contact: bugzilla → toolbars
This bug has been buried in the graveyard and has not been updated in over 5 years. It is probably safe to assume that it will never be fixed, so resolving as WONTFIX. [Mass-change filter: graveyard-wontfix-2014-09-24]
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.