From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45855 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Time for partial download of nnimap messages again? Date: Sat, 27 Jul 2002 16:09:18 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87sn2gzx0y.fsf@doohan.bang.priv.no> <871ya0yx7y.fsf@doohan.bang.priv.no> <873cugx9xy.fsf@doohan.bang.priv.no> <87ptx9qz77.fsf@doohan.bang.priv.no> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1027779024 25257 127.0.0.1 (27 Jul 2002 14:10:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 27 Jul 2002 14:10:24 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17YSH0-0006Z6-00 for ; Sat, 27 Jul 2002 16:10:22 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17YSGJ-0005vq-00; Sat, 27 Jul 2002 09:09:39 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 27 Jul 2002 09:10:04 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id JAA00455 for ; Sat, 27 Jul 2002 09:09:52 -0500 (CDT) Original-Received: (qmail 16147 invoked by alias); 27 Jul 2002 14:09:21 -0000 Original-Received: (qmail 16141 invoked from network); 27 Jul 2002 14:09:20 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by gnus.org with SMTP; 27 Jul 2002 14:09:20 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.5/8.12.5) with ESMTP id g6RE9Ikd009983 for ; Sat, 27 Jul 2002 16:09:19 +0200 Original-To: ding@gnus.org Mail-Copies-To: nobody X-Hashcash: 020727:ding@gnus.org:8e23c95a1d1f2ca8 In-Reply-To: <87ptx9qz77.fsf@doohan.bang.priv.no> (Steinar Bang's message of "Sat, 27 Jul 2002 11:47:56 +0200") Original-Lines: 36 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45855 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45855 Steinar Bang writes: >>>>>> Simon Josefsson : > >> Steinar Bang writes: >>>>>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann): > >>>> Maybe the conservatism comes from the thing being hard to >>>> understand and not modularized as well as it could be... > >>> I really think it should be redesigned to become asynchronous. > >> IMHO using a framework like the URL package for backend >> communication would be good. Perhaps even extended further to be >> more thread friendly. > > With asynchronous backends, the idea is that you don't need threads. > The network traffic is powered by the event loop checking for waiting > input on sockets. I don't think an asychnronous backend interface is enough -- at least nnimap spend an non-neglible amount of its time processing, not waiting for IO. So it would still lock up Emacs when doing things. And Gnus, where most of the time is spent when entering groups, pressing g, etc, is not waiting for IO most of its time either. (Try elp-instrument-package on gnus-, imap-, and nnimap-. Only when doing very big operations will imap- consume much of the time, and the IO waiting is there.) > But the backend interface would need a complete restructuring: from > "request/response and then use the response to draw summary and > article buffers" to "send a callback with the request, and have the > callback draw summary and article buffers, as data arrives". Yup. Having incrementally built summary buffers (when you scroll the emacs buffer, with some intelligent prefetching) would be quite nice.