From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: OSX FSEvents file watching support Date: Thu, 18 Jul 2019 18:28:49 +0300 Message-ID: <835znzwedq.fsf@gnu.org> References: <0ce358e3-9333-4717-97d5-f03d882bc2d0@www.fastmail.com> <83lfwvy9ai.fsf@gnu.org> <87muhbeg01.fsf@gmx.de> <83a7dby2lp.fsf@gnu.org> <877e8fedwi.fsf@gmx.de> <834l3jy17z.fsf@gnu.org> <87o91rpgzh.fsf@gmx.de> <83k1cfwhn2.fsf@gnu.org> <83imrzwh3m.fsf@gnu.org> <87blxrpfhq.fsf@gmx.de> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126052"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: "Muir Manders" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 18 17:29:04 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 1ho8L9-000Wec-SE for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 17:29:03 +0200 Original-Received: from localhost ([::1]:39184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho8L8-0004rc-PM for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 11:29:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48236) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho8L5-0004rV-Mc for emacs-devel@gnu.org; Thu, 18 Jul 2019 11:29:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ho8L4-000548-EN; Thu, 18 Jul 2019 11:28:59 -0400 Original-Received: from [176.228.60.248] (port=3247 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ho8L1-0004PX-Nv; Thu, 18 Jul 2019 11:28:57 -0400 In-reply-to: (muir@mnd.rs) 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:238680 Archived-At: > Date: Thu, 18 Jul 2019 08:14:33 -0700 > From: "Muir Manders" > Cc: emacs-devel@gnu.org > > lsp-mode in particular needs to watch your entire source code project for file changes and then relay the file names that were created/modified/deleted fo the LSP server. This is to handle when files change outside the editor, like when changing branches. The LSP server registers file globs for the types of files it wants to receive notifications for, which is normally just the source code files and maybe some project metadata files (e.g. "**/*.go" to watch Go files). The LSP spec delegates file watching to the editor because file watching is hard, and in general there are fewer LSP clients (editors) than LSP servers. > > The current (kqueue, at least) backends must open many file descriptors to watch a large directory tree. FSEvents however can do this task efficiently. Beware: like I said earlier, I don't expect these facilities to be scalable enough for watching large trees that get a lot of frequent changes. AFAIK, lsp-mode developers recommend to turn off file notifications when there are a lot of them.