We detected that the first Persist() of an entity take much longer than all subsequent calls.
We have a small example (see Appendix) which outputs the following times:
First transaction with persist of MyEntity Transaction: 91 Persist: 84 First persist of FirstEntity Transaction: 16 Persist: 14 Second persist of FirstEntity Transaction: 1 Persist: 0 First persist of SecondEntity Transaction: 117 Persist: 103 Second persist of SecondEntity Transaction: 2 Persist: 0
Here you can see well that it will take longer if the entity is more complex.
Important setting in objectDB.conf for the example:
<cascade-persist always="auto" on-persist="true" on-commit="true" />
Could you explain the long time for first persist?