Closed
Bug 516594
Opened 16 years ago
Closed 14 years ago
Reduce calls to IsLowMemory() from imagelib
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dougt, Unassigned)
Details
Attachments
(1 file)
2.45 KB,
patch
|
joe
:
review-
|
Details | Diff | Splinter Review |
Turns out that calling IsLowMemory() can take as much as 2-4ms on some mobile platforms, and we call it alot from imglib.
I would like to reduce such calls -- maybe when we are writing less than 32k?
Attachment #400616 -
Flags: review?(joe)
Updated•16 years ago
|
Attachment #400616 -
Flags: review?(joe) → review-
Comment 1•16 years ago
|
||
Comment on attachment 400616 [details] [diff] [review]
patch v.1
mSize.width * mSize.height * 4
Reporter | ||
Comment 2•16 years ago
|
||
well, hell....
if I am seeing this makes a difference, that means what? that we have lots of small images that are causing this much noise? Maybe we should do a better job caching? Fennec has a 1mb image cache.
Comment 3•16 years ago
|
||
Right now you're just comparing width * height, which is not a size in bytes, it's a size in pixels. If you want to use bytes, you have to multiply by 4.
Reporter | ||
Comment 4•16 years ago
|
||
well, i see that now. :-)
i suppose I am asking more a fundamental question. basically my calculations were off by 4x. which means that I am only filtering very very small images from this IsLowMemory check. I am wondering why I am seeing a bunch of these when I am panning around in fennec. eg. why aren't they cached / why are they being re-decoded.
Reporter | ||
Comment 5•14 years ago
|
||
isLowMemory() is deprecated. i removed these calls a while ago, so this patch isn't needed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•