[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object creation is slow. Disk Access?



>   While accessing Ozone objects is fast, either creation or destruction of
> Ozone objects (not sure which) seems to require a disk access.  This is
> making my app slow to a crawl.

I looked further into this.  Each object creation calls
WizardStore.updateLockLevel() which calls Cluster.updateLockLevel() which
calls Cluster.saveShadow() which calls File.renameTo(), hence the disk
access.

It seems that the cluster's "shadow" is deleted on commit and restored on
abort.  However, it does not look like the shadow is saved by saveShadow().
This is strange.  For example:

start a transaction
 
 do some work
  create object A (replaces the current (presumably non-existant) shadow
with the cluster)
  create object B (replaces the current shadow (from the previous line)
with the cluster)

abort (this replaces the cluster with the current shadow.  This is the
shadow created when we created object B, not the one created when we made
object A, or one from the start of the transaction.)