Hi Pierre, On Thu, 27 Aug 2020 at 13:15, Pierre Neidhardt <m...@ambrevar.xyz> wrote:
> zimoun <zimon.touto...@gmail.com> writes: > >> If you are going to an local SQL database, my two questions are: >> >> a) >> Which part would update it? “guix pull”? Other? Even using >> substitutes, the channels and co could lead to an extra cost and so what >> is acceptable and what is not? > > I suggest fetching database updates when performing the filesearch, just > like `guix size` does. I am not sure to see how. One needs all the database to search inside and cannot know in advance which packages etc.. Contrary to “guix size” which manipulates the graph and then download the missing parts. Therefore, your suggestion is to download all the database the first time the user run “guix filesearch”, i.e., download ~10MiB. Then each time the user runs “guix pull” then “guix filesearch”, two options, either download the new database for this last Guix generation, or either download a diff (not sure the complexity is worth for ~10MiB). Right? And what about the channels? Because if I read correctly, “guix size” fails when “no available substitute information“. >> b) >> Could you also include other fields such that “synopsis” and >> “description”? Because it could speed up “guix search” without adding >> (or modifying) the current cache >> (~/config/guix/current/lib/package.cache); discussed at length in >> #39258 <http://issues.guix.gnu.org/issue/39258>. > > I think this is a bit beyond the scope of this patch set. I'd rather > focus on files exclusively for now and proceed one step at a time :) I do not think it is beyond the scope because Arun introduced an SQLite database for improving “guix search”. But this path had been stopped because of “introducing complexity” [1]. Therefore, if “guix filesearch” introduces a SQL cache, then it seems a good idea to be also usable by “guix search”. Well, if the table is extended with the fields “synopsis” and “description” then what is the size of the database? Does it kill the lookup performance? [1] http://issues.guix.gnu.org/issue/39258#7 Cheers, simon