On Fri, 27 Aug 2010 09:52:53 +0400
denisgolovan <[email protected]> wrote:
> I just tested new search index based on SQLite backend in cave 0.54.0.
> Works perfect!
> 
> The only problem is it needs to rebuilt from scratch every time and
> it takes quite a lot of time. I assume that I need to rebuild it
> after every sync, don't I? If yes, are there any plans to make
> incremental?

The search index becomes invalid after you change *anything*. If you
sync, it's invalid. If you install, upgrade, reinstall or uninstall
something, it's invalid. If you change any of your configuration files,
it's invalid.

There's no performance gain to be had from incremental updates after a
sync. After a sync, to build an index, every bit of metadata has to be
checked to see whether it's changed, which is where the time goes (and
the cost of removing a subset of invalid things and reinserting new
values into an SQLite table is pretty much the same as just rewriting
the entire thing from scratch).

It *would* be possible to avoid having to rebuild the entire index
after an install. Implementing something like 'cave manage-search-index
--reindex cat/pkg' wouldn't be very difficult. However, knowing which
packages to reindex isn't entirely trivial if any version or previously
existing version of the package in question is involved in virtuals in
some way.

Really, the only time it makes sense to use a search index is if you're
likely to run several searches one after another. Anything beyond that,
and the cost of keeping the search index up to date outweighs the gains
of having one at all -- inaccurate search results as given to you by
certain other programs are worse than useless...

-- 
Ciaran McCreesh

Attachment: signature.asc
Description: PGP signature

_______________________________________________
paludis-user mailing list
[email protected]
http://lists.pioto.org/mailman/listinfo/paludis-user

Reply via email to