franferta / jdbm2

Automatically exported from code.google.com/p/jdbm2
0 stars 0 forks source link

[Enhancement] RecordHeader.setAvailableSize() speed improvement #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The current implementation of RecordHeader.setAvailableSize() calls deconvert() 
twice: once to read the old value, and once for the new value. It even writes 
the value back if it was (and remains) zero.

Attached is a rewritten RecordHeader.setAvailableSize() which avoids that by 
manipulating directly the "internal fragmentation" that is actually stored.

Original issue reported on code.google.com by t.wolf...@gmail.com on 10 Jun 2011 at 8:50

Attachments:

GoogleCodeExporter commented 8 years ago
BTW, how about renaming BlockIO.readUnsignedshort to BlockIO.readUnsignedShort 
(capital "S")?

Original comment by t.wolf...@gmail.com on 10 Jun 2011 at 8:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by kja...@gmail.com on 12 Jul 2011 at 6:46

GoogleCodeExporter commented 8 years ago
This patch causes lot of exceptions while unit test is runned. It also does not 
seems to reflect changes made in JDBM 2.

Original comment by kja...@gmail.com on 4 Sep 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by kja...@gmail.com on 4 Sep 2011 at 3:22