JARZz <ja...@protonmail.com> writes: > Hello all, > > I have a case of a somewhat irregular org mode setup. Here are the givens: > > 1 I have many org files. One for each week of the year, including a > couple of generic ones, IE journal.org, routines.org, wiki.org, > etc. All in all it's about 120 files or so, all loaded to my > org-agenda.
120 files is a lot, but the overhead is generally in setting up each Org buffer, activating org-mode and calling hooks, etc. Once a buffer is open, searching them should be fast enough, depending on size, search type, etc. > 3 I need to use agenda searches with specific information, such as > user names, machines names, program names etc. in my agenda to find > specific cases. You might give org-ql a try, as its searching is generally much faster, although it won't solve any TRAMP-related problems. > As long as I worked with my files locally, things were OK. TRAMP slows > me down a lot, though. I know the problem is not the connection > because scp and ssh session works like a breeze. It seems the issues > happens with indexing the files. > I don't know what happens behind the scenes exactly, but it takes a > good minute or to load my agenda with all the files, and it can take > 10-15 minutes to search through them for a specific string. This > problem also happens when I used sshfs, which makes me believe more > strongly the problem is, again, not with the ssh connection itself, > but with the indexing. There is no indexing. :) (org-ql does implement a per-buffer, per-query cache for repeated queries, though. And org-roam does offer a database that searches some parts of Org files, although I've no idea if it's compatible with TRAMP.) > Is there a way to seep this up? Or perhaps a workaround you think > might work? I want to use the GUI Emacs. What do you think? Also, what > causes this? As you probably know, Emacs and Org are full of configuration and state. I have little experience with TRAMP, but from what I do have, I've seen that state and configuration can cause major performance issues in unexpected ways. So I'd suggest that you try to reproduce the problem in a clean, or as minimal as possible, Emacs configuration. My with-emacs.sh script would help with that: https://github.com/alphapapa/with-emacs.sh If it still happens in a clean Emacs, then you should try using the latest version of everything: Emacs, Org, and related packages. (Again, with-emacs.sh makes it easy to test in separate configs, and something like Guix can help with running newer Emacs versions.) If it doesn't happen in a clean Emacs, then you could try using the bug-hunter package to bisect your config. If none of that helps, you'll probably have to dig in to the problem, use the profiler, etc, to try to find what exactly is taking so long. This kind of problem usually isn't easy to troubleshoot. :( Good luck! Adam