Closed Bug 1131468 Opened 9 years ago Closed 8 years ago

Running app.js and build-app.js on node.js

Categories

(Firefox OS Graveyard :: Gaia::Build, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rickychien, Assigned: rickychien)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Assignee: rchien → nobody
Status: ASSIGNED → NEW
Priority: -- → P1
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Summary: Running app.js on node.js → Running app.js and build-app.js on node.js
Attachment #8564923 - Attachment is obsolete: true
Comment on attachment 8716742 [details] [review]
[gaia] rickychien:app-and-build-app-to-node > mozilla-b2g:master

Final piece of P1 build scripts. For now on, `make` or `make SOME_BUILD_FLAGS` is able to run on pure node env without xpcshell support.

Unfortunately, I found we've performance issue that running on node is slower than in xpcshell. And I've no idea for the root cause behind it and it needs to investigate more.

Because build system to node.js migration isn't first priority on Gaia, so we're not going to take more resources on this migration from now on. I'd like to leave RUN_ON_NODE=0 by default until I can find out root cause for slow performance on node. Rest of the investigations for node performance issue will be doing in my free time.

Scott, I need you to do me a favor and stamp this patch for me. thanks!
Attachment #8716742 - Flags: review?(scwwu)
Root cause of slow performance for RUN_ON_NODE=1 is doubtless in esprima JS parser which are used in r.js optimize [1].

Build time was dramatic increased after upgrading requirejs from 2.1.15 to 2.1.16 and that couldn't be workaround by requirejs and is up to the esprima team.


[1] https://github.com/jrburke/r.js/issues/850
Another reason for slow performance issue is in spawn process launching time on node that performs slower than nsIProcess on xpcshell. I only tested on OS X and it might have different results on other platforms.

We are able to address this issue by adopting process pool to limit process number that might improve performance.
Comment on attachment 8716742 [details] [review]
[gaia] rickychien:app-and-build-app-to-node > mozilla-b2g:master

Looks good to me. Thanks!
Attachment #8716742 - Flags: review?(scwwu) → review+
Landed in master:

https://github.com/mozilla-b2g/gaia/commit/99273acecb3572c4a7585a37915c7db0b4012de7
Status: ASSIGNED → RESOLVED
Closed: 8 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: