Opened 13 years ago

Closed 13 years ago

#8563 closed defect (fixed)

Build Memory Usage excessive in some cases

Reported by: dante Owned by: dante
Priority: high Milestone: 1.3
Component: BuildSystem Version: 1.2.3
Keywords: Cc: dante
Blocked By: Blocking:


The build system uses excessive ammounts of memory when running, particularly when using stripConsole. Running a demos-all profile build with stripConsole:"all" shows the java process using 378m, requiring to be modified to call -XmxNNNN in order to complete.

Attached is a patch that reduces the memory usage significantly by waiting until the last moment to rebuild the fileContents string, taking sections of it out along the way (rather than setting fileContents to a reduced version of itself in each iteration of the loop)

With this, I am able to run the demos-all profile with stripConsole:"all" with the default 256m defined. Though memory increase may be needed in large cases, this significantly reduces the usage and will likely allow for most use cases to avoid providing additional memory to java.

Hoping to review for 1.3

Attachments (1)

build.patch (1.9 KB) - added by dante 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by dante

Attachment: build.patch added

comment:1 Changed 13 years ago by James Burke

Looks good to me, if you have run it and the code still works, I'm good for committing it.

comment:2 Changed 13 years ago by dante

Owner: changed from James Burke to dante
Status: newassigned

tested output to be identical in either case, and the memory win is huge.

comment:3 Changed 13 years ago by dante

see also #7698

comment:4 Changed 13 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [16628]) fixes #8563 - great patch from Artsem Prakaptsou [cla] reduces memory usage significantly. can run demos-all with no default increase jvm memory allocation (256). likewise with a "stock" xdomain build. this will save a lot of headaches. Thanks Artsem!

Note: See TracTickets for help on using tickets.