monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] some observations about roster node IDs


From: Timothy Brownawell
Subject: Re: [Monotone-devel] some observations about roster node IDs
Date: Thu, 28 Jun 2007 21:35:51 -0500

On Thu, 2007-06-28 at 15:07 -0700, Zack Weinberg wrote:
> Performance testing on the file_path/split_path changes led me to
> thinking about node_id lookups.  Some things I've noticed:
> 
> regenerate_caches (on a monotone database) spends nearly seven percent
> of runtime in dynamic_cast<> implementation, going from node_t to
> dir_t and/or file_t.

Make node_t hold everything and an "enum Type {FILE, DIR};", and then
file_t and dir_t can be inlineable wrapper classes?

> We are currently doing node ID lookups with a hybrid_map, which is
> both a STL map (i.e. red-black tree) and a hashtable.  Lookups do not
> show up in my profiles, but I suspect they would for other workloads.

The lookup just uses the hashtable, so it really shouldn't show up until
everything else is sped up a lot. The map is only there to provide
ordered iteration (for eg roster_merge.cc, which does parallel iteration
on rosters).

Using vectors would be interesting, but would depend on the number of
simultaneously active independent lines in the database. Probably fine
for individual developers unless they like to pull the world, but
probably less fine for a server db shared by a lot of projects.


-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

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