Closed Bug 835695 Opened 11 years ago Closed 10 years ago

Use jar reordering with core apps packages

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fabrice, Assigned: fabrice)

References

Details

Attachments

(2 files, 3 obsolete files)

This is an experiment to see if reordering application packages helps with startup time.
Attached patch gecko patch v1 (obsolete) — Splinter Review
Assignee: nobody → fabrice
Attached patch gaia patch v1 (obsolete) — Splinter Review
To set up everything properly, apply the patches, and flash a VARIANT=user build.

Then run these steps:
- in gaia, make start-reorder
- launch all the apps on the phone that you want to preload
- in gaia, make stop-reorder
- in gaia, PRODUCTION=1 make production
Chris, do you mind running your timing tests with these?
Flags: needinfo?(jones.chris.g)
mwu, can you help measure this.
Flags: needinfo?(jones.chris.g) → needinfo?(mwu)
I started with trying to get a measure of how much IO contributes to the startup time, but startup time seems to massively vary regardless of whether we have hot or cold caches. I'll try measuring with reordered jars but I doubt we can see much improvement if a hot cache doesn't necessary give us better startup..
Flags: needinfo?(mwu)
What steps are you using to test?  What app are you testing?
I updated gecko and changed my testing procedure a bit, and the numbers are a lot less noisy now. Email had a difference of ~130ms between hot and cold startup, and clock had a difference of ~200ms. However, even after reordering, the startup times did not seem to change much.
Whiteboard: [FFOS_perf]
Whiteboard: [FFOS_perf]
So I revisited that technique and results are pretty different, probably because gaia apps moved from loading a few big files to loading a lot of small ones and it's more important to reorder.

On a tarako, cold launch of the settings apps drops from ~2000ms to ~1720ms - a huge gain for "just" some build time machinery.

Yuren, let's work on that next week together!
Attached file Gaia PR for v1.3t
Attachment #707454 - Attachment is obsolete: true
Attachment #707455 - Attachment is obsolete: true
Attachment #8373219 - Flags: review?(yurenju.mozilla)
Attached patch gonk-misc patch (obsolete) — Splinter Review
Michael, this change to b2g.sh let us restart in jar reordering logging mode by setting a temporary property. Looks cleaner to me than to pull/push b2g.sh to add the export on the fly.
Attachment #8373220 - Flags: review?(mwu)
Updated according to irc discussion.
Attachment #8373220 - Attachment is obsolete: true
Attachment #8373220 - Flags: review?(mwu)
Attachment #8373756 - Flags: review?(mwu)
Comment on attachment 8373756 [details] [diff] [review]
reorder-b2g-sh.patch

Review of attachment 8373756 [details] [diff] [review]:
-----------------------------------------------------------------

r=me on the jar part

::: /home/fabrice/dev/tarako/gonk-misc/b2g.sh
@@ -4,4 @@
>  mkdir -p $TMPDIR
>  chmod 1777 $TMPDIR
>  ulimit -n 8192
> -export MOZ_CRASHREPORTER=1

?
Attachment #8373756 - Flags: review?(mwu) → review+
Comment on attachment 8373219 [details] [review]
Gaia PR for v1.3t

r=yurenju and please add a space around | for this line:
> APPS=`cut -f 1 -d ' ' jarloader.log |sort -u|grep gaiamobile| cut -c 8-`

for 1.3t we can land this patch but for master we should rewrite optimizejar.py in javascript. 

do you think we need a follow up bug to rewrite in javascript for master or just trace it in this bug?
Attachment #8373219 - Flags: review?(yurenju.mozilla) → review+
Thanks Yuren! We should definitely do the js rewrite in another bug.
log files on 1.3t:
https://github.com/mozilla-b2g/gaia/commit/56bd97aef3e453a008ee2c1908dce16e7afd127e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 974769
Blocks: 991459
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: