I connect to the H2 database with the option WRITE_DELAY=0.

After some profiling sessions, I noticed that the thread
org.h2.store.WriterThread takes a lot CPU time even if none inserts/
updates are made.

So after checking the code I saw the following lines:
            // TODO log writer: could also flush the dirty cache when
there is
            // low activity
            // wait 0 mean wait forever
            int wait = writeDelay > 0 ? writeDelay : 1;
            try {
                Thread.sleep(wait);
            } catch (InterruptedException e) {
                // ignore
            }

It means that the WriterThread is wake up every millisecond and flush
the transaction log.

Is it the expected behaviour, if no did you plan fix it ?

Thanks for your answer,

Xavier

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to