Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 31253 invoked from network); 13 Jul 2005 20:19:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2005 20:19:55 -0000 Received: (qmail 56090 invoked by uid 500); 13 Jul 2005 20:19:50 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 56038 invoked by uid 500); 13 Jul 2005 20:19:50 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 56023 invoked by uid 99); 13 Jul 2005 20:19:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 13:19:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [204.146.167.214] (HELO Boron.MeepZor.Com) (204.146.167.214) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 13:19:47 -0700 Received: from [127.0.0.1] (dmz-firewall [206.199.198.4]) by Boron.MeepZor.Com (8.12.8/8.12.8) with ESMTP id j6DKJlq5005181 for ; Wed, 13 Jul 2005 16:19:49 -0400 Message-ID: <42D57762.10804@wstoddard.com> Date: Wed, 13 Jul 2005 16:19:46 -0400 From: Bill Stoddard Reply-To: bill@wstoddard.com User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: mod_mbox: js speed and mbox size References: <20050713195102.GA9780@bulix.org> In-Reply-To: <20050713195102.GA9780@bulix.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Maxime Petazzoni wrote: > Hi, > > As I already said, the AJAX browser in mod_mbox relies on a hidden > XmlHttpRequest and on Javascript processing of the replied XML > document to generate the message list. > > After setting up a browser stub, I'm not going to concentrate on > compatibility and speed problems before continuing. In fact, there are > two main problems implied by the current mechanism : > > - On large mailboxes, the /ajax/msglist query reply can get *very* > large. As an example, this mailing list's 2001-08 archives contains > 1708 messages, and the corresponding XML is 452492 bytes big. This > is too much. As a comparison, the old mod_mbox resulting page for > the same month is "only" 311 KB big. > > As a solution to this, Ian advised the use of LiveGrid > (http://openrico.org/livegrid.page). It fetches only the piece of > data that need to be displayed (ten, twenty, ... rows instead of the > whole 1700+). I don't really like this solution because the user > must scroll the table, and then wait for the data to appear, > etc. Isn't this where XmlHttpRequest comes in handy? Asynchronously fetch X (a hundred?) rows forward from where the user is currently looking in anticipation that that user will scroll forward. So you don't slurp down the whole mailbox at once, but you try to stay ahead of what the user might be expected to do and always have some data ready to display. > And that we don't get the whole list (no in-page search for > example). > > Another solution would be to use a page system as in the Debian > mailing list archives, displaying 100 or 200 messages per page > only. This would reduce bandwidth usage, but it will also make things > harder when updating the context box. For the moment, the message > list is fetched once, and all operations are made on this stored > list. When updating the context box, we just take -3 to +3 messages > from the list. With the page system, we'll experience problems while > approaching the end of a page ... > > - The second problem is brought by the first one. On large mailboxes, > the Javascript processing takes too much time. Building all elements > each time the message list is displayed (at loading time or when you > close a message box) does not make the application usable. > > Of course, the paging system would solve this problem, too. In > addition to this, my Javascript code may not be the most optimized > we could find. > > - Concerning compatibility problems, the whole thing does not work > nor with IE, neither with Opera, although both of these browsers > does not comply against any javascript error. > > Any JS compatibility expert in the house ? Heh, you wish :0 This is a cool project, glad it's on the httpd dev list. Bill