Hi, I'm sorry I don't understand why getLastSetBit can take much time... Could you describe your use case please? What database version do you use? If you use version 1.0.x, could you try if upgrading to 1.1.x solves the problem?
Regards, Thomas On Thu, Mar 5, 2009 at 3:49 PM, Mikkel Kamstrup Erlandsen <[email protected]> wrote: > Hi all, > > In our work with H2 at the State and University Library of Denmark we > encountered a strange performance decrease when inserting a certain kind of > records into our H2 database. Digging into H2 with the VisualVM profiler I > discovered that whopping 89% of the running time was spent in > BitField.getLastSetBit()! > > I think what triggered this was that the new records inserted (really > OAI-PMH harvested abstracts) where bigger than our usual stuff which in turn > triggered some new code paths in H2 (writing the blob content to an external > file?). > > Anyways - I added a cache to BitField.getLastSetBit() which dropped the 89% > running time down below 0.1%. This in turn provided us with almost x2.2 > overall performance boost when inserting these kind of records. > > I also have a patch for the 1.0.79 series of H2 - if anyone is interested > please email me or ping me here. > > -- > Cheers, > Mikkel Kamstrup Erlandsen > > Software Developer at > State and University Library of Denmark > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
