From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kOaTGFKPVmEShQAAgWs5BA (envelope-from ) for ; Fri, 01 Oct 2021 06:32:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gGEUFFKPVmF5IAAAbx9fmQ (envelope-from ) for ; Fri, 01 Oct 2021 04:32:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A4F630C40 for ; Fri, 1 Oct 2021 06:32:17 +0200 (CEST) Received: from localhost ([::1]:56466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWADX-0005AO-Bf for larch@yhetil.org; Fri, 01 Oct 2021 00:32:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWACm-0005AF-Tj for emacs-orgmode@gnu.org; Fri, 01 Oct 2021 00:31:28 -0400 Received: from ciao.gmane.io ([116.202.254.214]:53018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWACl-0002qB-40 for emacs-orgmode@gnu.org; Fri, 01 Oct 2021 00:31:28 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mWACj-0003rf-C0 for emacs-orgmode@gnu.org; Fri, 01 Oct 2021 06:31:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Adam Porter Subject: Re: searching agenda from TRAMP Date: Thu, 30 Sep 2021 23:31:18 -0500 Message-ID: <87r1d5pdrd.fsf@alphapapa.net> References: <1xEnw9kb5GR4RksDbFm8eZljQaIa8kxBX0laFtNn8ID4W760qXxlSwRB_6vKzWNyA_66iq5u60xzUaSVqjRjT__U-N_gL4mVbenvR4x0FHk=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633062738; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ULLX1IRkpOBSxFJKn70OGBT6AGmk+APPSOtq39UtMC4=; b=LhFMbvQvFeUNSAjcE1D5E0tgkd3gg/W5ARv5KyGmiOpZKT9rB0mBV27MQV+/885n8wxHGS r2D4vtKl96t0uHYVpJqpnVELRdle6RcAa8NusA9c6hVpgs9JBiyPHuW9E8RD5kWcOxRG4u 8bVsTaiq6wlq7iUvRNMUh8f5JoIgI8OhAP3o5BsgBnbi9Y8pHqGaoxRw147rgI0meFD2tW UQcmr8gZSd4kJAZHkKbfooAY3sXmmKA5m5S3NL48KYQrmdnANKZG0cFz/8EuTwnoN9bTX8 QoNnX2KwHwVFS/fwANEZvxnuQO/MXsW0o07vOEndomMdDaaBqxRfOU/JZ7pHeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633062738; a=rsa-sha256; cv=none; b=m6Qm8S8rId13UmIYdHoe46pJdWVQBOQrhdsxVTcgzgPEKEOnIZvVQ1Giw4z8+Or1wQqNPP lp3afr+DjpwFgEYobjUlGowHeUc060Ps4nELmFbIuXAhRXFUp4JRWbYG6nQvIKU5AkU6eE wvGMAOnphOpAduuBhrTL+WyPeZMxNpLAAQmNVFy3kA4BZm+6raMxLegiiIdFDovqshWzxn fquQBmq/aQSA7zynIuAcMT2u7J83n1CJwicB++xGRFbZlStfcV5EUf86nNN5gr9WFb1TMs eG857bZMnqN3R8CRtjvV1KQkPMYAixsKtu1s/XKyFaeFJa7XmugZgQGEixCwpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8A4F630C40 X-Spam-Score: -1.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: Mv+iclOHw68d JARZz 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