Code Review Request for # 6975829 : Perf. of gzip in existing JDKs is too slower than in 1.3.1

Xueming Shen xueming.shen at oracle.com
Tue Oct 5 18:04:06 UTC 2010


  Thanks! webrev has been updated as suggested.

http://cr.openjdk.java.net/~sherman/6975829/webrev/ 
<http://cr.openjdk.java.net/%7Esherman/6975829/webrev/>

-Sherman

On 10/01/2010 04:03 AM, Alan Bateman wrote:
> Xueming Shen wrote:
>> :
>>
>> It still appears the memory/buffer handling code in Inflater.c can be 
>> changed to improve
>> the performance in use cases similar to above mentioned scenario. The 
>> proposed change
>> is to copy no more than the size of the "user's buffer". It's an 
>> de-compression, so you can't
>> consume more bytes than you can write out in most cases. The attached 
>> test case shows
>> the performance of gzip-ing the un-compressed rt.jar by using 
>> different buffer size.
> Good find!
>
> It might be a bit clearer in the Z_OK/Z_NEED_DICT cases if you added a 
> "consumed" variable, eg:
>
> case Z_OK:
>    jint consumed = in_len - strm->avail_in;
>    :
>
> That would make the update of the input off/len a bit clearer.
>
> Otherwise looks good to me.
>
> -Alan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20101005/6b45ac36/attachment.html>


More information about the core-libs-dev mailing list