unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Possible problem with Gnus
Date: 14 May 2004 23:18:06 +0200	[thread overview]
Message-ID: <x5fza2zp0x.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1BOjob-00070z-IZ@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

>     > If there are bugs in the Postscript support, please start
>     > reporting them one by one.  This is a feature that is supposed
>     > to work, and if it doesn't, we should fix it.
> 
>     It is not a feature that is supposed to work.  From the code in
>     lisp/gs.el:
> 
> This makes it somewhat less urgent.  But we still want this feature
> to work.  We should start fixing the problems in it, even if we do
> so one by one.
> 
> To set an example, I will add -dSAFER to gs-options.
> 
>       The only platform on which the postscript device works in the
>     first place is X11.
> 
> That platform is more important than all the rest.
> While we do support Windows and MacOS, they should never
> weigh more in our decisionmaking than the GNU operating system.
> 
>     The sane thing to do is to serialize the whole GhostScript
>     operation to have at most one GhostScript process running, and
>     to not restart this process as long as images remain to be
>     rendered.
> 
> That does sound desirable.  However,
> 
>       For this to work, one has to stop passing the information
>     through an XPixMap but has to go through a file or pipe.
> 
> Using a pixmap is preferable, in general.  Why do you think
> using a single Ghostscript process is incompatible with using
> a pixmap?

Because the interface to GhostScript that is used for passing the
XPixMap Id and the respective sizes is queried just at the start of
GhostScript.  You can't change the size after GhostScript has
started, so if you want to use one GhostScript process, it may only
connect to a single XPixMap of fixed size.

At least that's what I remember from last taking a look at the matter.

>       In contrast, preview-latex first deals with on-screen images.
>     Once they are dealt with, it reverts to rendering the rest
>     off-screen.
> 
> That would be a good optimization to add.

Rendering off-screen material is actually not as much an optimization,
but an interactivity feature.  It means that once GhostScript is
through, scrolling through the file is not computationally expensive.

However, if some document has thousands of images, it would be saner
to render them just to disk in case you'll need them, but not burden
Emacs' memory with them unless one actually moves there.

If one wanted to fold a sizable chunk of the preview-latex concept
into the display engine, then the display engine would need to

a) be able to deal with general PostScript (multi-page) instead of
isolated EPS files
b) know which images belong to the same PostScript file, so that it
will render them together, reading the PostScript resources of the
file only once, like a PS previewer.

The off-screen rendering/caching might be restricted to just images
from a single PostScript file: savings are largest in that case.

But investing serious work of that kind for the rather special case
here would probably not be worth it unless one expanded the mechanism
to be able to deal with more general conversion processes, like
dvi->ps->png or gnuplot->png or stuff like that.  If one would really
want to immerse oneself into stuff like that, one would probably want
some more general image rendering/embedding mechanism.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2004-05-14 21:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-09 23:07 Gnus for next release Miles Bader
2004-05-09 23:19 ` John Wiegley
2004-05-09 23:29 ` Stefan Monnier
2004-05-09 23:54   ` Miles Bader
2004-05-10  7:34     ` Frank Schmitt
2004-05-10  8:31 ` David Kastrup
2004-05-10 10:04   ` Reiner Steib
2004-05-11 12:22     ` Possible problem with Gnus Richard Stallman
2004-05-11 12:40       ` David Kastrup
2004-05-12 19:40         ` Richard Stallman
2004-05-11 13:48       ` Stefan Monnier
2004-05-11 16:07       ` Reiner Steib
2004-05-11 16:31         ` Paul Jarc
2004-05-12  9:59           ` Reiner Steib
2004-05-12 14:15             ` Paul Jarc
2004-05-12 15:48               ` Jesper Harder
2004-05-12 16:39               ` Reiner Steib
2004-05-12 15:36             ` Jesper Harder
2004-05-11 17:51         ` Stefan Monnier
2004-05-12  9:59           ` Reiner Steib
2004-05-12 10:34             ` David Kastrup
2004-05-13 15:45               ` Richard Stallman
2004-05-13 17:25                 ` David Kastrup
2004-05-13 17:59                   ` Stefan Monnier
2004-05-13 19:07                     ` David Kastrup
2004-05-14 21:01                   ` Richard Stallman
2004-05-14 21:18                     ` David Kastrup [this message]
2004-05-15 18:33                       ` Richard Stallman
2004-05-23  3:46                         ` Andy Tai
2004-05-23  3:48                         ` Andy Tai
2004-05-10 17:54 ` Gnus for next release Richard Stallman
2004-05-10 18:23   ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5fza2zp0x.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).