Closed Bug 41268 Opened 24 years ago Closed 24 years ago

imglib should cache chrome animations

Categories

(Core :: Graphics: ImageLib, defect, P3)

All
Other
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: warrensomebody, Assigned: pavlov)

References

Details

(Keywords: arch, perf)

Right now the situation is completely insane when the throbber kicks in. Animated GIFs aren't cached by imagelib, which causes us to end up fetching them again with necko. This ends up reading the file from disk because the file: protocol doesn't cache in the memory cache either. This also causes contention for the file transport, consumes inordinate amounts of memory, takes a lot of time, etc. Clearly, the throbber images should get cached somewhere, ideally by imagelib in their decoded state. We should extend the imagelib APIs to allow us to specify when an animated gif should be cached
Keywords: arch
W: I agree that the way the throbber works now is _less_ than ideal. but I think it would make more sense to cache throbber data in necko before it is decompressed. Decoding is cheap. We are already running into memory requirement problems on the mac. If we wanted to cache the decoded image data, what about using a different format? We handle streaming image data fine. Most apps use a 'doctored' format for internal images. We don't. but we could in this case. -P
Status: NEW → ASSIGNED
But that would require hooking up the file: and jar: protocols to the memory cache which doesn't seem like the right thing to do. It's very rare (except for the throbber case) that you'd try to retrieve the same file more than once. I think the image cache is a better place for this.
Target Milestone: --- → M18
I agree with warren.
nominating for nsbeta2, this could be a big performance win.
Keywords: nsbeta2
If this throbber is really sucking down IO and CPU cycles... is there any chance that we could slow the refresh rate on the images until we have the real architectuural fix in place? For most users, a throbber that was a little slow/jerky would b ea nice tradeoff for a faster browser.
I think this is clearly a beta3 thing, but not a beta2 thing. Jar: You might be thinking of the time spent cycling through the animated gif, but I'm concerned about hitting the disk each time we start and end a load. Both should be looked at.
Agreed...giving [nsbeta2-] and putting on nsbeta3 nominee radar.
Whiteboard: [nsbeta2-]
I have some changes for bug#30852 (an nsbeta2+) that will give us a way to tell the throbber to _atleast_ get internal images from the necko cache. I noticed today that all chrome and internal images are requested with a 4402 and 4400 necko load attributes, which is FORCE_VALIDATION. This means even non animated images are not cached. The only way imglib can validate the freshness of an image is to tell it to not use the imgcache and go get it from necko. At this point necko should know whether it can get the data from its cache, or it should reload the data from the source (server, file, whatever). And I agree that this is a beta3 issue. -p
Also be aware that all animations are more costly on X than other platforms... and this may be due to the way we render on X. Pav had some good insights into ways we might speed things up. (window invalidation, reusing structures rather than using new ones...etc.)
Keywords: perf
Keywords: nsbeta3
*** Bug 46340 has been marked as a duplicate of this bug. ***
neeti has a potential fix for this! Check with her. making this nsbeta3+
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3+]
What is it? I really want the fix here to be "make file: protocol use memory cache".
*** Bug 49098 has been marked as a duplicate of this bug. ***
Changing summary to the generic problem. -p
Summary: throbber needs to cache images → imglib should cache chrome animations
Isn't this the same bug as bug 49097?
Not really. I have to handle animations for the first time in the imgcache. -p
*** Bug 49097 has been marked as a duplicate of this bug. ***
Blocks: 50778
*** Bug 29536 has been marked as a duplicate of this bug. ***
*** Bug 36785 has been marked as a duplicate of this bug. ***
Not holding PR3 for this, marking nsbeta3-. Please nominate for rtm if we really have to fix this before shipping Seamonkey.
Whiteboard: [nsbeta2-][nsbeta3+] → [nsbeta2-][nsbeta3-]
Nominating for RTM
Keywords: rtm
this bug blocks a theme authors ability to animate buttons on rollover.
approving for rtm.
Whiteboard: [nsbeta2-][nsbeta3-] → [nsbeta2-][nsbeta3-][rtm+]
I'm still working on this. Its a non trivial fix. If we back out the PIN_CHROME changes by #undef'ing PIN_CHROME, it will also unblock "theme authors ability to animate buttons on rollover". The PIN_CHROME changes prevent the unloading of chrome images in the img cache and was put in to help performance. Unfortunately, there are several unpleasant side effects.
Can we get enough of the necko memory cache working for chrome animations?
Updating QA Contact
QA Contact: elig → tpreston
Marking "needinfo". This seems like a bad thing, but we need a patch, review and super review to clear for checkin.
Whiteboard: [nsbeta2-][nsbeta3-][rtm+] → [nsbeta2-][nsbeta3-][rtm+ needinfo]
I am still working on this one. Its not ready for testing or initial reviews. -p
Whiteboard: [nsbeta2-][nsbeta3-][rtm+ needinfo] → [nsbeta2-][nsbeta3-][rtm+ need info]
After 2 weeks, is this dead for RTM?
I'm working on it. I'm working on it. Crashers have priority over performance and mozilla is demanding alot of attention these days. Thanks for asking, -p
Changing this from [rtm+ need info] to [rtm need info], since the [rtm+ need info] state doesn't exist.
Whiteboard: [nsbeta2-][nsbeta3-][rtm+ need info] → [nsbeta2-][nsbeta3-][rtm need info]
No fix in sight for rtm.
Whiteboard: [nsbeta2-][nsbeta3-][rtm need info] → [nsbeta2-][nsbeta3-][rtm-]
Blocks: 61479
Keywords: nsbeta2, nsbeta3, rtmnsbeta1
Whiteboard: [nsbeta2-][nsbeta3-][rtm-]
Blocks: 66964
Blocks: 66966
Target Milestone: M18 → ---
Depends on: 70938
Target Milestone: --- → Future
All pnunn bugs reassigned to Pav, who is taking over the imglib.
Assignee: pnunn → pavlov
Status: ASSIGNED → NEW
new imagelib caches all chrome animations
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
er, not just chrome animations. all animations including chrome ones.
You need to log in before you can comment on or make changes to this bug.