← Back to team overview

launchpad-dev team mailing list archive

The 512K javascript hard limit - Where I'm at

 

Hi Launchpadders-

  As build engineer this cycle, I've been working on making the javascript
development story better (since that's where I spend most of my time).  The
most perplexing issue is that Windmill does not like
lib/canonical/launchpad/icing/build/launchpad.js to be larger than 512K.  We've
found ways to ensure that we don't hit this limit in the short term, but I've
been trying to figure out why we have the limit in the first place.

  I have been using a KCachegrind profiler that mars, slightly modified it in
a branch[1] to make it work, and then running all the tests in the
CodeWindmillLayer[2]. I have two callgrind files (attached).  The "before" file
is the run when the launchpad.js is smaller than 512K.  I then injected a
bunch of nonsense code (but still valid javascript) to make the file larger.
I ran the profiler again, and got the "after" file.  I don't see anything that
sticks out, and generating the call graph in kcachegrind WILL indeed OOM kill
your system (I have 4GB of RAM and closed everything down and still had it
happen quite quickly).

  If anyone has some insight on these files that they'd be willing to share, I
would greatly appreciate it.  As it stands now, there's not much in the way of
build engineer stuff that needs my attention.

Cheers,
Paul

[1] lp:~rockstar/launchpad/windmill-profiling
[2] bin/test -vvc --layer=CodeWindmillLayer

Attachment: profile_after.prof
Description: Binary data

Attachment: profile_before.prof
Description: Binary data