Hi Lucian,

Thanks for taking your time, rerunning the tests and do some profiling.

> When inserting a 160 KB xml structure 100.000 times, the persist operation 
> duration starts by  ~45 ms and reach ~2000 ms after 68.000 persist 
> invocations and 16 hours of run time (!)

Indeed this differs quite a lot from the tests I have made so far, and
from the patterns I am used to.

It was helpful to have a look into the Java profiling files: A plain
FileOutputStream.open call takes most of the time, while it’s hardly
measurable in my own tests. Do you work with a local file system?
Maybe the file listing of your database directory could shed some more
light here.

I would additionally assume that this that you were closing and
opening your database after each addition, right? Obviously this makes
sense if no bulk operations take place; it’s just different from what
I did in my tests.

> There are actually two AUTOFLUSH-related issues: […]

You are obviously right: AUTOFLUSH should only be used for bulk
operations, and avoided if persistency of data is critical. And the
addition of documents will always be faster if the database is small
(but it should definitely not take more than a second to add a single
small document).

Best,
Christian

Reply via email to