monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Unnecessary performance hit on push?


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Unnecessary performance hit on push?
Date: Wed, 28 Sep 2005 20:20:05 -0700
User-agent: Mutt/1.5.9i

On Wed, Sep 28, 2005 at 11:41:05AM +0200, Marcel van der Boom wrote:
> In our case that last select retrieves more than 30.000 records, of  
> which almost all of them will be irrelevant.
> 
> Isn't there a way to call get_certs() in database.cc with the  
> signature where the value is also included in the where clause of th  
> query? The delay on the current query is *very* noticeable.
> From casual inspection it doesnt seem necessary to retrieve *all*  
> certificates, but i'm still a bit lost in the woods in the code.

Sure, should be straightforward -- could just do a loop over each
branch name, doing something like:
  cert_value branch_name(name);
  base64<cert_value> branch_name_encoded;
  encode_base64(branch_name, branch_encoded);
  vector< revision<cert> > certs;
  app.db.get_revision_certs(branch_cert_name, branch_name_encoded, certs);

I don't have time to try this out ATM; anyone interested in seeing if
it makes a difference?

-- Nathaniel

-- 
When the flush of a new-born sun fell first on Eden's green and gold,
Our father Adam sat under the Tree and scratched with a stick in the mould;
And the first rude sketch that the world had seen was joy to his mighty heart,
Till the Devil whispered behind the leaves, "It's pretty, but is it Art?"
  -- The Conundrum of the Workshops, Rudyard Kipling




reply via email to

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