From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: fast image paging Date: Wed, 13 Nov 2013 11:49:23 -0500 Message-ID: References: <87mwlabt0w.fsf@happiness.m.enhanced.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384361380 23999 80.91.229.3 (13 Nov 2013 16:49:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 16:49:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Camm Maguire Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 13 17:49:44 2013 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 1VgddP-0000Uc-Ut for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 17:49:44 +0100 Original-Received: from localhost ([::1]:49648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgddP-0006Wt-BF for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 11:49:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgddF-0006SZ-DH for emacs-devel@gnu.org; Wed, 13 Nov 2013 11:49:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgdd7-0001Ld-Vb for emacs-devel@gnu.org; Wed, 13 Nov 2013 11:49:33 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgdd7-0001LF-QW for emacs-devel@gnu.org; Wed, 13 Nov 2013 11:49:25 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rADGnNvg016279; Wed, 13 Nov 2013 11:49:23 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 64AF7B4071; Wed, 13 Nov 2013 11:49:23 -0500 (EST) In-Reply-To: <87mwlabt0w.fsf@happiness.m.enhanced.com> (Camm Maguire's message of "Mon, 11 Nov 2013 15:08:47 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 2 Rules triggered PHISH_ACC_002=0.1, RV4761=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4761> : inlines <216> : streams <1073098> : uri <1594185> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:165236 Archived-At: > Greetings! I have a djvu mode which is designed for scholars reading, > annotating, and cross-referencing many large documents. Right now I use > pbm formats and create-image. This makes it easy to highlight and > correlate pixels with text, but the images can get quite large, making > handling sluggish on slower machines. > Will I improve anything here using a compressed format like png? Or, > when emacs displays and moves the image, does it decompress the image > anyway into the same sized internal data structure? I don't know the precise details, but I think that if you use PNG you won't gain much because indeed, the png library will begin by decompressing the image and keeping it that way in memory. You might have better luck if you use the `imagemagick' image type, which might be able to render dejavu directly (i.e. without going through pbm/png/...), so only the current page is kept in decompressed bitmap form. IIRC last time someone tried to use it there were some problems (performance, maybe?). Those problems may have been fixed since, I can't remember. It's definitely worth a try, I think, tho. And I'd be very happy to see your mode in GNU ELPA, so if you're interested in submitting it for inclusion, send me an email, Stefan