Last Comment Bug 735894 - Fire the image discard timeout more often
: Fire the image discard timeout more often
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Justin Lebar (not reading bugmail)
: Milan Sreckovic [:milan]
Depends on: 732820 746055
  Show dependency treegraph
Reported: 2012-03-14 15:42 PDT by Justin Lebar (not reading bugmail)
Modified: 2012-04-16 21:11 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (1.22 KB, patch)
2012-03-14 15:47 PDT, Justin Lebar (not reading bugmail)
joe: review+
Details | Diff | Splinter Review

Description Justin Lebar (not reading bugmail) 2012-03-14 15:42:59 PDT
The main motivation for this is  (We're still working out a few bugs before we un-protect it, but I'm happy to give out the password privately.)

AWSY waits for 30s before taking some measurements.  But images are currently discarded 20-40s after they're unlocked.  (This is true even with the rewrite of discarding in bug 732820.)

It's kind of lame to make a change primarily for a benchmark, but I don't see much possible harm in firing the discard timer once every 10s instead of once every 20s.  We'd leave 20s as the discard timeout; we'd just check for timed-out images twice as frequently, so images would be discarded 20-30s after they're unlocked.
Comment 1 Justin Lebar (not reading bugmail) 2012-03-14 15:47:02 PDT
Created attachment 606000 [details] [diff] [review]
Patch v1
Comment 2 Joe Drew (not getting mail) 2012-03-14 17:44:59 PDT
This isn't free, of course: we'll use more battery.
Comment 3 Justin Lebar (not reading bugmail) 2012-03-14 18:00:12 PDT
(In reply to Joe Drew (:JOEDREW!) from comment #2)
> This isn't free, of course: we'll use more battery.

I imagine that 1000 extra events use less energy than decoding one large JPEG image -- that is to say, we'd have to fire a lot of extra events before this matters.  But perhaps we can think of a pathological case where we'd fire a lot of extra events, or perhaps an event is more expensive than I imagine...

I'm OK trying to shim a fix into the config file used by AWSY, rather than changing this pref here, if you're concerned.
Comment 4 Joe Drew (not getting mail) 2012-03-14 18:02:57 PDT
Well, of course if we actually re-use those decoded images rather than redecoding them, we'd save that decoding energy too. :)

I'm not that conerned about this value. It was not arrived at scientifically. We should just go in to this with eyes open.
Comment 5 Joe Drew (not getting mail) 2012-03-15 13:03:42 PDT
Comment on attachment 606000 [details] [diff] [review]
Patch v1

Review of attachment 606000 [details] [diff] [review]:

I had initially misread this bug as changing the timeout. However, this just makes us a little more accurate towards our timeout deadlines, which I am fine with.
Comment 6 Justin Lebar (not reading bugmail) 2012-03-15 14:53:02 PDT
Comment 7 Marco Bonardo [::mak] 2012-03-16 06:21:15 PDT

Note You need to log in before you can comment on or make changes to this bug.