From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Fri, 05 Dec 2008 12:02:19 +0100 Message-ID: References: <87abbiody1.fsf@master.homenet> <877i6l5d8s.fsf@master.homenet> <874p1npvtj.fsf@master.homenet> <87ej0qci8g.fsf@master.homenet> <87y6yxm7xr.fsf@master.homenet> <87oczroysm.fsf@master.homenet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228475168 17020 80.91.229.12 (5 Dec 2008 11:06:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2008 11:06:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 05 12:07:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L8YWE-000251-VM for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2008 12:06:47 +0100 Original-Received: from localhost ([127.0.0.1]:42938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8YV4-0005v4-5S for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2008 06:05:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8YUz-0005uz-Ho for emacs-devel@gnu.org; Fri, 05 Dec 2008 06:05:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8YUx-0005tk-F6 for emacs-devel@gnu.org; Fri, 05 Dec 2008 06:05:28 -0500 Original-Received: from [199.232.76.173] (port=34374 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8YUx-0005th-BF for emacs-devel@gnu.org; Fri, 05 Dec 2008 06:05:27 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:44267 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8YUw-0003Zb-KQ for emacs-devel@gnu.org; Fri, 05 Dec 2008 06:05:26 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L8YUp-0007iW-Oi for emacs-devel@gnu.org; Fri, 05 Dec 2008 11:05:19 +0000 Original-Received: from dialin-226024.rol.raiffeisen.net ([195.254.226.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Dec 2008 11:05:19 +0000 Original-Received: from eller.helmut by dialin-226024.rol.raiffeisen.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Dec 2008 11:05:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dialin-226024.rol.raiffeisen.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:W+UkKuJeRO5qnHi3US5CDur2Qyg= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106605 Archived-At: * Miles Bader [2008-12-05 09:20+0100] writes: > This is because emacs, being an interactive system, generally doesn't > have a lot of long-running code. It's the relatively few exceptions to > this rule (e.g. gnus reading in new messages) that are the main issues > in practice. Fixing those places will probably yield a lot of benefit > for (relatively) small amount of work. I'm wondering what the exact problem with Gnus is. Certainly, downloading the next article takes a bit of time but threads wont make the download any faster. Is there something the user wants to do while waiting for the next article? There's also something called "gnus-async" which supposedly downloads articles in the background. It's clearly possible to do I/O in the background with ordinary process-filters; we need no threads for that. It's probably a bit harder to parse messages in process-filters as with threads, but threads are also tricky (preemptive or not). Opening a connection can also take some time, but again, it can be done asynchronously with the :nowait argument to make-network-process. I don't know if Gnus uses this possibility. It would be interesting to know what is easier: adding threads or rewriting Gnus with process-filters. Threads could probably be used to "stop" the current command and continue it in the background. Something like job control in a shell. That would be a nice feature, but I don't know if it is worth all the complexity that threads introduce. Helmut.