From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Computing project-files in another thread Date: Wed, 04 Sep 2019 18:11:17 +0200 Message-ID: <87y2z46nyy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="202118"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 04 18:11:54 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i5Xsw-000qTW-F8 for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2019 18:11:54 +0200 Original-Received: from localhost ([::1]:35082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Xsv-0000fY-Ce for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2019 12:11:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38993) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5XsS-0000fG-3N for emacs-devel@gnu.org; Wed, 04 Sep 2019 12:11:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i5XsS-0000HL-0I for emacs-devel@gnu.org; Wed, 04 Sep 2019 12:11:24 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:51479) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1i5XsR-0002Ca-97 for emacs-devel@gnu.org; Wed, 04 Sep 2019 12:11:23 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id E81B420CB3 for ; Wed, 4 Sep 2019 12:11:22 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 04 Sep 2019 12:11:22 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejhedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd ertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhg qeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeegiedrkedtrdejtddrvd ehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhp vghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnh hurdhorhhgsehfrghsthhmrghilhdrfhhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: from thinkpad-t440p (p2e504619.dip0.t-ipconnect.de [46.80.70.25]) by mail.messagingengine.com (Postfix) with ESMTPA id 28C8280061 for ; Wed, 4 Sep 2019 12:11:22 -0400 (EDT) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239834 Archived-At: Hi all, I started using Raven [1] which is something similar to Helm. I.e., you have a list of sources like buffers and recent files and get a nice completion UI for switching buffers and finding files. I added another source for project files which calls `project-files' in projects recognized by project.el. That blocked the UI for large projects because `project-files' essentially uses find using `shell-command-to-string', and that might take a while. So I tried computing `project-files' in another thread which initially keeps the UI responsive, but as soon as the new thread becomes the active one, the UI blocks again. I assume that's because below `shell-command-to-string' there's no `thread-yield' call, right? Does anyone know a strategically good place to put a `thread-yield', or do we need to rewrite `project-files' somehow to make thread-switching during a call to it possible? Thanks for any pointers! Tassilo [1] https://github.com/chameco/raven