[email protected] wrote:
On Thu, Apr 02, 2009 at 03:37:44PM -0700, Brock Pytlik wrote:
[email protected] wrote:
[snip]
This is the new (as of yesterday), hoped for behavior. I'm still working
on getting that implemented (and hitting some interesting behavior along
the way). One modification I made to the proposal was that if an image
is empty and is being installed into for the first time (think a newly
created user image), then we do build the index. So, the behavior I'm
currently looking at implementing is:
1) If the index exists, update it.
2) If the index doesn't exist and no packages are present in the image,
set up the empty index then update it. (This is fast)
3) If the index doesn't exist but the image has packages, don't index.
This indexing behavior will also be present in PackageManager.
I think this addresses the issues for installing and searching for
PackageManager and the cli. Please let me know if I've overlooked
something.
Just a couple further thoughts on your proposal.
It may be advantageous to provide a command-line or API option to remove an
existing index. (I don't know what interface the installer is using.)
At least this way, there won't be a corresponding installer change
required if you later change the format / on-disk layout of the local
index.
Sure, I can through that in as an api/command line option. Unless I see
a compelling reason though, I won't target it for this release. AFAIK
the installer doesn't know anything about the search indexes other than
to not build them by using --no-index. Am I wrong about that?
Case #2 is fast, but how much overhead does #1 add as the user performs
small operations. IIRC, you modified local search to journal its
updates, right?
Right, case #1 is also generally fast. I only mentioned that case 2 was
fast because it wasn't something we'd discussed before. Case #1 is only
slow every 20th package installed since the last time the index was
rebuilt or so, and that number can be adjusted as we see fit. On my
desktop, at about 20 unindexed packages, local search time had doubled.
If we want to, we can jack that number much higher. Under normal
behavior, the index is rebuilt during image-update.
Brock
-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss