Closed
Bug 1029977
Opened 11 years ago
Closed 11 years ago
Do not use data-uris for collection backgrounds
Categories
(Firefox OS Graveyard :: Gaia::Everything.me, defect, P1)
Tracking
(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: jlal, Assigned: amirn)
References
Details
(Keywords: memory-footprint, perf, Whiteboard: [c=memory p= s=2014.07.18.t u=2.0] [MemShrink:P2][systemsfe][ETA=7/17])
Attachments
(2 files)
While debugging something else I noticed we are using data uris for the collections background image.... This has a number of performance problems and we should use blobs of images OR a straight source of an image if that is available.
This can have a significant memory impact.
Comment 1•11 years ago
|
||
Need to understand the depth of the memory impact here to make a blocking call.
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking?]
Whiteboard: [MemShrink]
Comment 2•11 years ago
|
||
James - Can you evaluate the memory impact here (i.e. how much memory is being used here)?
Flags: needinfo?(jlal)
Updated•11 years ago
|
OS: Mac OS X → Gonk (Firefox OS)
Priority: -- → P3
Hardware: x86 → ARM
Whiteboard: [MemShrink] → [MemShrink][c=memory p= s= u=]
Reporter | ||
Comment 3•11 years ago
|
||
Memory report attached... It is hard to tell what the difference would be using a bloc or src but we currently use at least 1.8mb for the datauri.
Flags: needinfo?(jlal)
Comment 4•11 years ago
|
||
Kyle - This might be one of the reasons why bug 1029902 is present. What's your take on a blocking decision on this bug from a MemShrink perspective? Do you need this fixed to help fix bug 1029902?
Flags: needinfo?(khuey)
Reporter | ||
Comment 5•11 years ago
|
||
This does not directly effect the memory of the homescreen this is allocated in the collections app (which unless I am mistaken) is not in the same process as the homescreen.
Flags: needinfo?(khuey)
The 1.8 MB is the image created from the data URI, not the URI string itself. We should fix this, but it's probably a relatively minor (e.g. < 10%) part of bug 1029902.
Blocks: 1029902
blocking-b2g: --- → 2.0?
Also this memory is in the "Smart Collections" process and I have no idea what that is. Is there a design doc somewhere I can read?
Updated•11 years ago
|
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking?] → [VH-FL-blocking-][VH-FC-blocking+]
Whiteboard: [MemShrink][c=memory p= s= u=] → [MemShrink][c=memory p= s= u=] [systemsfe]
Updated•11 years ago
|
blocking-b2g: 2.0? → 2.0+
Comment 8•11 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #7)
> Also this memory is in the "Smart Collections" process and I have no idea
> what that is. Is there a design doc somewhere I can read?
No time for documentation this time around unfortunately, but basically we've split the homescreen and everything.me code up into different apps. The homescreen ships with a few "smart collections", and when you tap on one it will open an activity to view a smart collection. It's highly unlikely that this impacts bug 1029902, unless you were measuring with a smart collection open - so unblocking for now.
Also I just double checked and this is *exactly* what smart collections do in 1.4, so there shouldn't be much of a regression here.
No longer blocks: 1029902
Component: Gaia::Homescreen → Gaia::Everything.me
Comment 9•11 years ago
|
||
We should fix this, but I don't think it should block 2.0 as this is the exact same behavior as what we do in 1.4. Noming for 2.0? and suggesting that we don't block.
blocking-b2g: 2.0+ → 2.0?
Comment 10•11 years ago
|
||
Okay, I'll kick this out of the blocking queue if it's long-standing.
blocking-b2g: 2.0? → backlog
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+] → [VH-FL-blocking-][VH-FC-blocking-]
Updated•11 years ago
|
Whiteboard: [MemShrink][c=memory p= s= u=] [systemsfe] → [MemShrink:P2][c=memory p= s= u=] [systemsfe]
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → amirn
Comment 11•11 years ago
|
||
(In reply to Kevin Grandon :kgrandon from comment #8)
> (In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #7)
> > Also this memory is in the "Smart Collections" process and I have no idea
> > what that is. Is there a design doc somewhere I can read?
>
> No time for documentation this time around unfortunately, but basically
> we've split the homescreen and everything.me code up into different apps.
> The homescreen ships with a few "smart collections", and when you tap on one
> it will open an activity to view a smart collection. It's highly unlikely
> that this impacts bug 1029902, unless you were measuring with a smart
> collection open - so unblocking for now.
>
> Also I just double checked and this is *exactly* what smart collections do
> in 1.4, so there shouldn't be much of a regression here.
Sadly I did a measurement while the homescreen is starting up. At that point it seems that the base64 images are loaded both into the app window, but also into the the chrome scope.
It results into having the exact same amount of memory at the end, but it is two times biggers when the homescreen is starting up.
My current theory is that the base64 images are loaded once into the homescreen window, and once into the chrome scope by the datastore.
It means that when the homescreen is killed, it will consume 2 times more memory if the user has some collections on the homescreen...
Asking 2.0? again.
blocking-b2g: backlog → 2.0?
Updated•11 years ago
|
blocking-b2g: 2.0? → 2.0+
Updated•11 years ago
|
Target Milestone: --- → 2.0 S6 (18july)
Assignee | ||
Comment 12•11 years ago
|
||
what is the "gaia way" for converting base64 image to blob?
Assignee | ||
Comment 13•11 years ago
|
||
James, can you please run the memory profile again?
Attachment #8456938 -
Flags: review?(kgrandon)
Attachment #8456938 -
Flags: feedback?(jlal)
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 8456938 [details] [review]
Pull Request
f? on Vivien for memory profiling as well. thanks!
Attachment #8456938 -
Flags: feedback?(21)
Updated•11 years ago
|
Priority: P3 → P1
Updated•11 years ago
|
Severity: normal → blocker
Whiteboard: [MemShrink:P2][c=memory p= s= u=] [systemsfe] → [MemShrink:P2][c=memory p= s= u=2.0] [systemsfe]
Updated•11 years ago
|
Comment 15•11 years ago
|
||
Comment on attachment 8456938 [details] [review]
Pull Request
I'm guessing this should be much better. We do still need to process the base64 encoded image to generate the blob, but I guess there's no real way around it - though it should be relatively rare that we do it since we have the CDN images now I think?
Anyway, the code seems fine so R+. Would prefer to have Vivien or someone measure the difference in memory usage before landing though.
Attachment #8456938 -
Flags: review?(kgrandon) → review+
Updated•11 years ago
|
Whiteboard: [MemShrink:P2][c=memory p= s= u=2.0] [systemsfe] → [MemShrink:P2][c=memory p= s= u=2.0] [systemsfe][ETA=7/17]
Comment 16•11 years ago
|
||
Let's land and people can verify/measure that this is better. Thanks!
Master: https://github.com/mozilla-b2g/gaia/commit/a470c523d1f0d50c039f6a7e0326a06e2a4e7db3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 17•11 years ago
|
||
Needs rebasing for v2.0 uplift.
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → fixed
Flags: needinfo?(amirn)
Keywords: branch-patch-needed
Assignee | ||
Comment 18•11 years ago
|
||
looks like we have conflicts because bug 1016221 is not in v2.0.
updated dependency.
Depends on: 1016221
Flags: needinfo?(amirn)
Assignee | ||
Comment 19•11 years ago
|
||
Comment on attachment 8456938 [details] [review]
Pull Request
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): Using base64 image src
[User impact] if declined: Memory usage is high
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: switched to using blobs instead
Attachment #8456938 -
Flags: approval-gaia-v2.0?
Updated•11 years ago
|
Whiteboard: [MemShrink:P2][c=memory p= s= u=2.0] [systemsfe][ETA=7/17] → [c=memory p= s=2014.07.18.t u=2.0] [MemShrink:P2][systemsfe][ETA=7/17]
Updated•11 years ago
|
Attachment #8456938 -
Flags: approval-gaia-v2.0?
Comment 20•10 years ago
|
||
Keywords: branch-patch-needed
Comment 21•10 years ago
|
||
Comment on attachment 8456938 [details] [review]
Pull Request
I guess this does not need my f? anymore.
Attachment #8456938 -
Flags: feedback?(21)
Reporter | ||
Comment 22•10 years ago
|
||
clear ni
Reporter | ||
Updated•10 years ago
|
Attachment #8456938 -
Flags: feedback?(jlal)
You need to log in
before you can comment on or make changes to this bug.
Description
•