mozilla/pdf.js — pull request #4213 by nnethercote (2014-01-29 05:54:59+00:00)
Title: Create less garbage while parsing

The first patch is the big winner. On my 4000+ page test case, it reduced peak RSS during file loading from ~1130 MiB to ~800 MiB.

The last patch is a bit weird, but does avoid creating lots of strings, which reduces pressure on the GC.