Date: 2009-11-06 15:23:35 -0800 (Fri, 06 Nov 2009)
Performance gains for some cases, related to FB-21917:
- When SwfEncoder.deflate() is done, it calls deflater.end(). This is important: It frees up native memory that otherwise wouldn't get freed until finalizers are called. The Java heap may appear to be fine, but Java's Deflater class uses a native "zlib" library that allocates native memory. (This is the primary cause of FB-21917.)
- There were still some cases when BEST_COMPRESSION was being used when it should have been using FAST_COMPRESSION: specifically, when writing out the incremental-compile cache of a CSS module.
- Made extensive changes to the way the incremental-compile code is written to disk so that writing it takes far less memory than it used to. The code used to have layers and layers of unnecessary buffers. In the case of FB-21917, closing a project (which causes its incremental-compile cache to be written out) used to take hundreds of megabytes, and take 30 seconds or more; now it happens almost instantly and uses almost no memory.
Reviewer: Peter Farland
Tests run: Compiler tests run by Gaurav