Closed Bug 390406 Opened 17 years ago Closed 16 years ago

Make Tabsposé block less on invocation

Categories

(Camino Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Camino2.0

People

(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)

References

Details

Attachments

(1 file)

Right now, Tabsposé doesn't come up until all of the thumbnails have been created, which can take a while with a lot of tabs, and/or on older machines. We can't do thumbnail creation on a background thread since it's so appkit-intensive, but we should be able to do something like this: 1) when it's invoked, start building thumbnails until x milliseconds have gone by (or we finish), and then show the view with what we have, and placeholders for everything else. 2) set up a timer that calls us back to build y milliseconds worth of thumbnails and display them, then returns to the event loop, and continues doing that in a loop until we are done.
One thing that might be worth considering is caching the thumbnail for a given tab once created until it becomes the frontmost tab, under the assumption that if someone is using tabsposé in a window they may well use it there again. That would let us make things smoother for heavier tabsposé users (assuming there's would actually be a reasonable amount of benefit from that kind of caching) without penalizing those who never use it.
This may be less critical after bug 405544; I think drawing to a non-accelerated surface may have been really hurting us perf-wise. Not that we shouldn't still look into this; just that we may not be in such bad shape.
Target Milestone: --- → Camino2.0
This is still pretty slow. It's noticeable with about 3 tabs, bearable up to about a dozen, and "why is nothing happening; did I really press the right keys?" beyond that (testing with all of Camino's default bookmarks and static/opt build, at some point soon before the Tabsposé view, you get a spinning beachball, so you know *something*'s happening, but that's not great).
I've been giving this some thought, and have a few ideas for ways we might approach it. I'll look at this soon, since it's the real blocker for pushing this as visible feature.
Assignee: Jeff.Dlouhy → stuart.morgan+bugzilla
Priority: -- → P2
This is phase one; rather than loading all the thumbnails before showing the view, show empty placeholders and then load the real thumbnails one at a time so the UI doesn't block for noticeable periods. I'd still like to explore ways of pre-generating and caching some of these thumbnails without killing memory usage, since the experience here is a bit odd, but since there are always going to be cases where we don't have pre-loaded images we'll need this infrastructure in place anyways.
Attachment #337303 - Flags: superreview?(mikepinkerton)
This seems much better; I'd definitely call Tabsposé usable now. One thing that does seem odd--but I don't know if it's a real-world scenario, depending on how people might use TTV for tab-switching--is that invoking TTV, switching tabs, invoking again means we re-draw all the thumbnails again. We should definitely look to cache (for some time T) thumbnails of pages that have completely loaded (and invalidate them on certain types of changes, if possible; I don't know if, e.g., AJAX stuff would send the kind of notification we'd be able to tap in to, or if we only get an initial "page finished loading" notification).
(In reply to comment #6) > We should definitely look to cache (for some time T) thumbnails of pages that ...and so long as the thumbnail size remains the same, too.
Attachment #337303 - Flags: superreview?(mikepinkerton) → superreview+
Comment on attachment 337303 [details] [diff] [review] non-blocking thumbnailing sr=pink my only concern would be with tabs that get closed in the background while the thumbing is going on. They'll still draw (since we've retained them). Does anything else update tabspose when a tab goes away under it?
Landed on CVS trunk, with checks to make sure we don't do pointless thumbnailing or crash when a tab closes during the lifetime of a Tabsposé session. I'll file a follow-up for brainstorming ways of making the thumbnails come up faster.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: