This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 20796

Summary: Patch for String and Integer conversion
Product: java Reporter: Svata Dedic <sdedic>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: TASK Exception Reporter:
Attachments: Patch against trunk sources

Description Svata Dedic 2002-02-22 16:18:55 UTC
The patch prevents the B-tree impl from creating String instances while it is
searching for a String value.
IOUtils contains fast (at least I hope) String <-> UTF-8 conversion, too, which
tries to avoid allocating intermediate objects. Read/write integer was factored
out from read/write methods for ease of use.
Comment 1 Svata Dedic 2002-02-22 16:21:15 UTC
Created attachment 4804 [details]
Patch against trunk sources
Comment 2 Martin Matula 2002-02-24 16:41:03 UTC
Applied. I was surprised that this small change improved the
performance signifacantly. I was comparing the original approach with
yours "pseudo-clean" :) because I was affraid that it will spoil the
code for no big difference, however it showed up that your code for
String (de)serialization is 10x faster than the original one, which
(together with separate serialization methods for int and boolean)
results in about 30% improvement of overall MDR performance! Thanks! :)