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 - Patch for String and Integer conversion
Summary: Patch for String and Integer conversion
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-22 16:18 UTC by Svata Dedic
Modified: 2002-07-19 15:23 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Patch against trunk sources (10.64 KB, patch)
2002-02-22 16:21 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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! :)