[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object creation is slow. Disk Access?
On Mon, 21 Feb 2000, you wrote:
> > 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.)
>
> >From this it seems that either a) there is a bug, or b) the shadows are
> useless and could be removed. Of course I've only looked at this code
> briefly, and I'm sure I'm misunderstanding something. If the shadow were
> only saved once per transaction would that be bad? What happens across
> multiple transactions?
Saving shadows multiple times is a real bad bug. I've fixed this. Thanks Will.
Of course a shadow has to represent to status just before a transaction
changes something to be able to rollback things in case of abort.
Besides the fixed bug transaction that create objects run typically 10% faster
now ;)
Falko
--
______________________________________________________________________
Falko Braeutigam mailto:falko@softwarebuero.de
softwarebuero m&b (SMB) http://www.softwarebuero.de