Closed Bug 983564 Opened 10 years ago Closed 10 years ago

[Gaia] [Build] reduce |make| time

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gduan, Assigned: gduan)

Details

Attachments

(1 file)

Find ways to reduce the time for |make|.
When execute |time make|, here's the result as below.

real	0m44.264s
user	0m34.328s
sys	0m8.281s
Attached file PR to master
After this patch
real	0m29.489s
user	0m20.891s
sys	0m6.552s
We've called utils.getGaia too many times in webapp-zip.js and webapp-manifest.js , I suggest we can cache the data inside utils.js. And we'll also refactor these two scripts later.
Assignee: nobody → gduan
Comment on attachment 8391087 [details] [review]
PR to master

Hi Yuren,
I believe this simple patch can reduce the |make| consuming time.
Please kindly check. Thanks.
Attachment #8391087 - Flags: review?(yurenju.mozilla)
Comment on attachment 8391087 [details] [review]
PR to master

George, could you use sinleton pattern for it?

we can use utils.gaia.getInstance() to get it and you can keep the instance in utils.gaia.
Attachment #8391087 - Flags: review?(yurenju.mozilla)
Comment on attachment 8391087 [details] [review]
PR to master

Hi Yuren,
patch is updated,
please kindly check, thanks.
Attachment #8391087 - Flags: review?(yurenju.mozilla)
Comment on attachment 8391087 [details] [review]
PR to master

r=yurenju if this.data is changed to this.instance, thank you!
Attachment #8391087 - Flags: review?(yurenju.mozilla) → review+
Merge into master,
https://github.com/mozilla-b2g/gaia/commit/a04f630e0a2bf382c9afe21784e357238434b32c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: