Donate Share

SOFIA

Tracker: Patches

5 Performance patch for JSPServlet.createPage() - ID: 2014293
Last Update: Tracker Item Submitted ( nobody )

Around line 482 of c.s.jsp.JSPServlet, in createPage,
you see this:

while (in.read() > -1);

Reading one byte at a time from an unbuffered stream.

Replace it with the following "performance 101" change and you can probably
feel the difference:


byte[] data = new byte[1024];
int n;
do {
n = in.read(data);
} while (n > -1);


Nobody/Anonymous ( nobody ) - 2008-07-09 15:52

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.