See revisions 899802, 899804, 899806, 899807 and 899810 for the improvements I made. This covers pretty much all of the remaining immediate simple bottlenecks I could find through profiling, so I'm resolving this issue as fixed.
The biggest higher level performance bottleneck is the way o.a.p.util.PDFStreamEngine.processEncodedText() processes each glyph separately. We would likely see major performance improvements if we refactor things so that the entire
string of encoded glyphs is first decoded as a single operation and then any graphics transformations are applied to
that whole block before processing the characters. That, however, is best handled as a separate issue.