monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] merging branch to allow 'automate stdio' over the n


From: Timothy Brownawell
Subject: Re: [Monotone-devel] merging branch to allow 'automate stdio' over the network
Date: Sun, 04 Oct 2009 17:18:13 -0500
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Stephen Leake wrote:
> I've been thinking we need a version of automate stdio that caches
> information across commands, rather than reinitializing everything for
> each command. In particular the database object and the current
> workspace could be cached. That would significantly speed up queries
> when preparing a commit; for example, a typical session would be:
> 
> cache session
> inventory
> get file 1 (for diff with changed version)
> get file 2
> ...
> close session
> commit
> 
> So maybe we could cache a key as well.
> 
> Changing to a different workspace or database during a session would
> have to be forbidden and detected.
> 
> Any automate command that currently builds a workspace object would
> have to be changed to use the session cached workspace object. That
> could be done incrementally.


The database is already cached, app_state contains a map<filename,
database_impl*> . Perhaps the keystore and workspace should be handled
the same way?

Or really, I suppose the app_state should just be turned into a caching
factory, eg move the database_cache logic into a "database &
app_state::get_database(filename)" and do something similar for
keystore, workspace, etc. The app_state used to contain the db,
keystore, etc, and making them all independent probably wasn't the best
of ideas (being able to only initialize the ones you need probably was
good, just implemented wrong).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]