On Wed, 2007-06-27 at 17:03 -0700, Zack Weinberg wrote:
> The hybrid_map is for roster_t::nodes, not for dir_t::children.
> Having O(1) lookup in dir_t::children would definitely help, but I'm
> not sure a hybrid_map is the right way to do it (to be honest though,
> I don't know what the right way *is* ... maybe, like, steal the
> directory htrees from ext3fs).
I tried that, and it actually seemed to slow things down a bit (for
pull, at least). Probably because we don't actually *do* lookups that
often, I think mostly we just iterate through everything. So the bigger
effect is the higher overhead of inserting into the map, since you now
have two indexes to maintain. Maybe a trie or something would work?