On Mon, Apr 3, 2023 at 4:49 AM David Bremner <david@tethera.net> wrote: > > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > Hi, > > > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > > > Very quickly I realized that most of what it does is something I've > > been working on for at least 10 years: making git work with other > > tools. > > > > I presume you haven't heard of git remote-helpers [1], because they do > > precisely what notmuch-git is trying to do. > > > > As a proof of concept I created a remote helper for notmuch [2]. If > > you have this script (`git-remote-nm`) anywhere in your path, git will > > interpret URLs prefixed with "nm::" as notmuch transports, and you can > > do: > > > > git clone nm::$HOME/mail > > I'm intrigued (and indeed I hadn't really thought about the degree to > which we were re-inventing git-fast-import and friends); however so far > my experiments did not get far enough to say anything conclusive. > > I tried your script with the bindings from master (554690) but it does > not seem to like my split configuration, where the database lives in > ~/.local/share/share/notmuch/default/xapian. Just clone the xapian database instead of the Maildir: % git clone nm::$HOME/.local/share/share/notmuch/default/ > Performance-wise the initial clone seems pretty slow. For my 600k > messages I have been waiting a while now. htop tells me that > git-fast-import has about 45 minutes of CPU time at this point. This > machine is not that fast, but for comparison an initial (i.e. fresh > repo, no caching) "notmuch git commit" takes about 15-20s. That's weird. In my tests generating the fast-export output is almost instantaneous, which means `git fast-import` is the one that is slow. And it seems it starts to get slow after a certain point, so perhaps it's not optimized to receive many files in one go. > If you need a larger corpus of messages to play with, the notmuch > performance suite includes about 400k messages, and running T00-new.sh > will build a notmuch database that you can clone. I tried that, the database has 194562 messages, and it takes 1:43 minutes to clone in my machine. It's weird it takes so long in your machine. Can you try to hardcode a search query to limit the number of messages? Just put something in here: $db.query('').search_messages.each Cheers. -- Felipe Contreras _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org