From: Arun Isaac <arunisaac@systemreboot.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Inverted index to accelerate guix package search
Date: Tue, 21 Jan 2020 02:12:31 +0530 [thread overview]
Message-ID: <cu78sm1dfm0.fsf@systemreboot.net> (raw)
In-Reply-To: <CAJ3okZ3WLYLNkOLKmaycQxPzHW2fXuGB=_t5JcFjcDG-LeFzJA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
I've replaced the cache building code in gnu/packages.scm with code that
builds a sqlite database instead. I haven't finished hooking this up to
the guix search code. I'll have it ready in another day or two.
> To test "guix pull", simple "make as-derivation". Disclaim: can take
> some time :-)
>
> Then the issue is more to avoid to pollute your ~/.cache/guix and
> ~/.config/guix :-)
>
> 1. Update Guix with the result in /tmp/test
>
> guix pull -p /tmp/test --url=/path/to/guix/repo
>
> 2. Create your SQL index
>
> /tmp/test/bin/guix pull -p /tmp/trash
>
> Now your index should be created with all the packages currently in master.
> To have something reproducible (and faster), I suggest to add
> --commit= and always pull against the same commit.
>
> 3. Test the index
>
> /tmp/test/bin/guix search foo
>
> I mean something along these lines. ;-)
Thanks, I got the idea. I'll try it out.
>> I think it is not possible to search using regular expressions in sqlite
>
> I think it is possible. I imagine something using multiple query.
> I will give a look at the Guile module.
Sure, let me know if you find something.
> I disagree. We should keep the regexp. Otherwise we cannot include
> under "guix search" or "guix package --search=" because arguments
> about backward compatibility.
I agree about backward compatibility.
>> About sqlite versus an inverted index using vhashes, I don't know if it
>> is possible to serialize a vhash onto disk. Even if that were possible,
>> we'll have to load the entire vhash based inverted index into memory for
>> every invocation of guix search, and that could hit
>> performance. Something like guile-gdbm could have helped, but that's
>> another story.
>
> And your first test was not fair. ;-)
> Because you compared when the hash table was already in memory.
> I mean to know the real performance, only timing can talk. :-)
Yes, it wasn't completely fair. :-P I was assuming there was some way to
efficiently serialize to disk and read from it without too much overhead.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2020-01-20 20:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 15:03 Inverted index to accelerate guix package search Arun Isaac
2020-01-13 8:48 ` Pierre Neidhardt
2020-01-13 15:08 ` Arun Isaac
2020-01-13 17:54 ` zimoun
2020-01-14 3:53 ` Bengt Richter
2020-01-14 14:21 ` Pierre Neidhardt
2020-01-14 15:27 ` Giovanni Biscuolo
2020-01-14 20:55 ` zimoun
2020-01-14 21:41 ` Pierre Neidhardt
2020-01-14 21:59 ` zimoun
2020-01-15 9:12 ` Pierre Neidhardt
2020-01-15 14:25 ` zimoun
2020-01-15 11:53 ` Giovanni Biscuolo
2020-01-15 14:49 ` zimoun
2020-01-16 19:06 ` Arun Isaac
2020-01-16 20:08 ` zimoun
2020-01-17 17:13 ` Pierre Neidhardt
2020-01-17 19:11 ` Pierre Neidhardt
2020-01-18 20:31 ` Arun Isaac
2020-01-15 5:44 ` Arun Isaac
2020-01-15 9:06 ` Pierre Neidhardt
2020-01-15 12:00 ` zimoun
2020-01-15 13:41 ` Pierre Neidhardt
2020-01-15 11:54 ` zimoun
2020-01-15 21:03 ` Ricardo Wurmus
2020-01-15 21:19 ` zimoun
2020-01-16 14:44 ` Ludovic Courtès
2020-01-16 15:04 ` zimoun
2020-01-16 19:11 ` Arun Isaac
2020-01-16 19:53 ` zimoun
2020-01-17 19:29 ` Arun Isaac
2020-01-20 19:14 ` zimoun
2020-01-20 20:42 ` Arun Isaac [this message]
2020-01-21 10:46 ` Ludovic Courtès
2020-01-23 20:49 ` Arun Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cu78sm1dfm0.fsf@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.