mozilla/pdf.js — pull request #4968 by nnethercote (2014-06-18 15:01:43+00:00)
Title: Build up textChunk.str more efficiently.

PartialEvaluator.getTextContent() builds up textChunk strings 1 char at a time,
creating many 100s of 1000s of intermediate strings along the way. This patch
make it instead push chars to an array and then join them at the end, as we
have done in numerous other places.