Closed
Bug 608042
Opened 14 years ago
Closed 13 years ago
Add ability to make "fat" android builds that extract APK to disk
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cjones, Assigned: blassey)
References
Details
Attachments
(2 files)
3.73 KB,
patch
|
dougt
:
review+
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
1.20 KB,
patch
|
Details | Diff | Splinter Review |
My phone has gigabytes of internal storage, so fennec using 50MB or so on disk isn't an issue. Trading startup time and/or memory usage for a smaller disk footprint is not worth it to me. This ought to become increasingly common (one hopes!). It would be nice if we could have a configure option (say --enable-fatfox for historical lulz) that turned off our custom loader. It would also be nice if we could offer these "fat" builds like we do the nothumb ones; I would use the fat builds, e.g. As mobiles evolve, we could look into making fat builds the default, and offer "skinny" builds for more limited devices.
Updated•14 years ago
|
tracking-fennec: --- → ?
Comment 1•14 years ago
|
||
Is speed and memory usage more important than "disk" size? I think it is.
Assignee | ||
Comment 2•14 years ago
|
||
This is a 730ms Ts improvement according to my stopwatch timing. It extracts 17.96Mb to the cache and cleans that up if we wind up running low on disk space. The low disk space threshold is set to 150Mb free. I just pulled that number out of my arse, but it seems reasonable to me.
Assignee: nobody → blassey.bugs
Attachment #501104 -
Flags: review?(doug.turner)
Assignee | ||
Updated•14 years ago
|
Attachment #501104 -
Flags: approval2.0?
Comment 3•14 years ago
|
||
I agree with extracting libs given enough capacity. I disagree about ditching custom loader. I would rather move all of this logic into the custom loader where more optimizations can be done. Brad convinced me that we can move logic into the loader + optimize in followup bugs.
Comment 4•14 years ago
|
||
Comment on attachment 501104 [details] [diff] [review] patch >+ boolean shouldExtact = freeSpace > kFreeSpaceThreshold; >+ if (!shouldExtact) { >+ // remove any previously extracted libs since we're apparently low If the free space is close to the threshold, then we'll get in a loop where we alternately extract the libraries and then delete them. If we want to avoid this, we could set the threshold for deletion somewhere below the threshold for extraction. Also, I can't see where we re-use the cached files after extracting them.
Comment 5•14 years ago
|
||
(In reply to comment #4) > Also, I can't see where we re-use the cached files after extracting them. Nevermind, I see it now (at the start of extractFile).
Comment 6•14 years ago
|
||
Comment on attachment 501104 [details] [diff] [review] patch extractLibs is a terrible name for a global. it would be nice if you used a prefix what does cacheFile.getPath() typically return? /data/data/???
Attachment #501104 -
Flags: review?(doug.turner) → review+
Updated•14 years ago
|
tracking-fennec: ? → 2.0b4+
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6) > Comment on attachment 501104 [details] [diff] [review] > patch > > extractLibs is a terrible name for a global. it would be nice if you used a > prefix its local to the file, not exported > what does cacheFile.getPath() typically return? /data/data/??? /data/data/org.mozilla.fennec/cache
Assignee | ||
Comment 8•14 years ago
|
||
dougt pushed https://hg.mozilla.org/mozilla-central/rev/d999c9baa0b7 filed bug 623598 for mbrubeck's concern over repeatedly extracting and deleting libraries
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Attachment #501104 -
Flags: approval2.0? → approval2.0+
Comment 9•14 years ago
|
||
I think this should be backed out. This actually makes cold startup slower on my galaxy S. And there seems to be some perf bug with the plugin-container. Here is cold startup without extraction disabled: E/GeckoLibLoad( 3613): spent 780ms total, 4 faults E/GeckoLibLoad( 3630): spent 134ms total, 0 faults cold startup AFTER extraction(ie this patch working): E/GeckoLibLoad( 3548): spent 973ms total, 113 faults E/GeckoLibLoad( 3566): spent 6091ms total, 18 faults The second line is plugin-container.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 10•14 years ago
|
||
Interesting!
Comment 11•14 years ago
|
||
Looks like this is the cause of 623999. I'm using ext4 for my cold startup. On mwu's rfs it was 14seconds for child process to start(1.3s for main). I worked around this here by setting extract_files=1 in the child. Not sure about the proper way of doing that.
Depends on: 623999
Assignee | ||
Comment 12•14 years ago
|
||
Bug 623912 added some code to make sure the child process opened the previously extracted libs rather than hitting the ashmem path. Is your tree up to date enough to have that? If that's not working correctly we should fix it. Also, setting a environment variable may be the best way to tell the child to extract the libs a needed
tracking-fennec: 2.0b4+ → ---
OS: Android → All
Comment 13•14 years ago
|
||
(In reply to comment #12) > Bug 623912 added some code to make sure the child process opened the > previously extracted libs rather than hitting the ashmem path. Is your tree up > to date enough to have that? If that's not working correctly we should fix it. Yes,from noon today.
Comment 14•14 years ago
|
||
This caps cold startup at < 4s for me.
Attachment #503629 -
Flags: review?(blassey.bugs)
Assignee | ||
Comment 15•13 years ago
|
||
Comment on attachment 503629 [details] [diff] [review] preload libxul to avoid expensive demand-paging overhead for it bug 623999 changes this code a bit and uses madvise to get a similar benefit
Attachment #503629 -
Flags: review?(blassey.bugs)
Comment 16•13 years ago
|
||
(In reply to comment #15) > > bug 623999 changes this code a bit and uses madvise to get a similar benefit Should this bug be duped against it? If not, should this bug block?
Assignee | ||
Comment 17•13 years ago
|
||
the patch on this bug already landed, not sure why it was reopened. Let's use follow up bugs for any other work
Status: REOPENED → RESOLVED
Closed: 14 years ago → 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•