From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Sun, 14 Feb 2016 18:40:25 +0200 Message-ID: <83d1rzz1mu.fsf@gnu.org> References: <87si1gx6wz.fsf@gnus.org> <86y4b5zvzt.fsf@gmail.com> <8760y9kwrk.fsf@gnus.org> <87wpqpjgwy.fsf@gnus.org> <83a8nk1cxk.fsf@gnu.org> <87h9hrnc8x.fsf@gnus.org> <83powfzsqt.fsf@gnu.org> <87y4b393hl.fsf@gnus.org> <83io27ytu3.fsf@gnu.org> <87k2mmzkry.fsf@gnus.org> <83k2mlyet8.fsf@gnu.org> <87lh71nriy.fsf@gnus.org> <8637t8opla.fsf@realize.ch> <871t8skg6c.fsf@gnus.org> <86y4b0n5q2.fsf@realize.ch> <87fux7gb7o.fsf@gnus.org> <83wpqjvd2f.fsf@gnu.org> <87zivfobn4.fsf@gnus.org> <86y4ao5g1c.fsf@realize.ch> <87r3ggdo9f.fsf@gnus.org> <86twlb5yl4.fsf@realize.ch> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455468055 10449 80.91.229.3 (14 Feb 2016 16:40:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 16:40:55 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Alain Schneble Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 14 17:40:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUzjB-0008BW-Tl for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 17:40:54 +0100 Original-Received: from localhost ([::1]:51833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzjB-0000hg-2Y for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 11:40:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzij-0000hB-RQ for emacs-devel@gnu.org; Sun, 14 Feb 2016 11:40:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUzig-00034m-2o for emacs-devel@gnu.org; Sun, 14 Feb 2016 11:40:25 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzif-00034i-Vw; Sun, 14 Feb 2016 11:40:22 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aUzif-00033h-6d; Sun, 14 Feb 2016 11:40:21 -0500 In-reply-to: <86twlb5yl4.fsf@realize.ch> (message from Alain Schneble on Sun, 14 Feb 2016 12:19:03 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199933 Archived-At: > From: Alain Schneble > CC: Eli Zaretskii , > Date: Sun, 14 Feb 2016 12:19:03 +0100 > > Lars Ingebrigtsen writes: > > > Alain Schneble writes: > > > >> The following patch removes the separate dns_processes list in favour of > >> reusing Vprocess_alist. The latter list is now used to loop over all > >> processes -- to check if pending DNS requests have completed. > >> > >> Do you agree whith this change? > > > > Well, it changes a test in the network loop that is basically a if (! > > NILP (Qnil)) in 99.9999% (plus some nines) of the cases with code that > > loops through all processes in the network loop all the time. > > True. Seems like I was too naive. I thought that these additional > cycles were negligible (even though it's O(n)...). We could traverse the list when Emacs is idle and maintain the result in a cache variable.