Hi,
> 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.
According to my test this thread takes virtually no CPU time (it is
not measurable). My profiling tool says that in many cases the thread
is in Thread.sleep(..), but that's expected: it is waiting there (the
thread is idle). Anyway I will change the code to:
if (wait < SysProperties.MIN_WRITE_DELAY) {
wait = SysProperties.MIN_WRITE_DELAY;
}
Regards,
Thomas
>
> 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
-~----------~----~----~----~------~----~------~--~---