guix-devel
[Top][All Lists]
Advanced

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

Re: File search progress: database review and question on triggers


From: Ricardo Wurmus
Subject: Re: File search progress: database review and question on triggers
Date: Thu, 13 Aug 2020 00:29:29 +0200
User-agent: mu4e 1.4.10; emacs 26.3

Julien Lepiller <julien@lepiller.eu> writes:

> Why wouldn't it help? Can't you make it a trie from basename -> complete 
> name? If I'm looking for "libcord.so" (which is a key in the trie), I don't 
> think I need to look for every path. I only need to follow the trie until I 
> find a pointer to some structure that contains the data I look for (ex: a 
> list of complete filenames).

Exactly!  It’s somewhat less useful (without pre-processing) for base
names and more useful for absolute file names, where you can quickly
toss out mismatches while traversing the trie.

You could also optimize the data structure by swapping the base name and
the directory name, assuming that users would want to search for either
absolute file names and also for base names (and not for a directory in
between).

-- 
Ricardo



reply via email to

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