Improve slurp performance by using native Java StringWriter and jio/copy

Description

Instead of copying each character from InputReader to StringBuffer.

Performance improvement:

Approach: Use StringWriter and jio/copy vs character by character copy. Results from the current patch see a 4-5x perf boost after the jit warms up, with purely in-memory streams (ByteArrayInputStream over a 6MB string).

Patch: clj-668-2.patch
Screened by: Alex Miller

Environment

None

Activity

Show:
Michael Blume
September 4, 2015, 1:44 AM

Is this blocked on a new perf comparison? Should I post one?

Michael Blume
September 4, 2015, 2:19 AM
Michael Blume
September 4, 2015, 2:28 AM
Michael Blume
September 4, 2015, 2:30 AM

This is with an SSD, no idea what the numbers would look like with a spinny disk.

Alex Miller
October 9, 2015, 2:23 PM

Updated patch to contain ticket id in commit description and provide a few more lines of diff context. No actual changes in the new patch, attribution retained.

Completed

Assignee

Timothy Baldridge

Reporter

Jürgen Hötzel

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Critical