unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Question about (excessive?) ram usage when many overlays (with large vscroll)
Date: Wed, 27 Apr 2022 16:01:59 +0200	[thread overview]
Message-ID: <CACJP=3kaF7fnZd9Ncmr3uVQnXAerbNqY5KVP2zvNr7xyYFaQnw@mail.gmail.com> (raw)
In-Reply-To: <87levs2enb.fsf@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

Thanks Po! Indeed, I was not aware of that (I couldn't find anywhere what
vscroll means 'exactly',
i.e. I did not know it was 'relative w.r.t. the 'current point').
Anyway, indeed doing what you suggested works great (i.e. fast scrolling
and no issue with the
large memory). Too bad I have to rewrite substantial parts of image-roll.el
again, but after that I
think it will finally provide a quite nice 'image-roll'.

On Tue, 26 Apr 2022 at 14:49, Po Lu <luangruo@yahoo.com> wrote:

> dalanicolai <dalanicolai@gmail.com> writes:
>
> > So I have created `image-roll.el` for displaying documents/books (see
> > here).  However, I have just noticed that it uses a large amount of
> > RAM when viewing (or trying to) pages in the back of 'large'
> > books. But even if RAM usage still looks perfectly fine, Emacs crashes
> > when trying to scroll to higher page numbers.
>
> I didn't try to reproduce this problem, but note that it's slow to
> vscroll large amounts of text.  Instead, find the start of the first
> line that will be visible onscreen (using window-text-pixel-size or
> posn-at-point), make that the window start, and set vscroll starting
> from there instead.
>

[-- Attachment #2: Type: text/html, Size: 1676 bytes --]

  reply	other threads:[~2022-04-27 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 12:21 Question about (excessive?) ram usage when many overlays (with large vscroll) dalanicolai
2022-04-26 12:33 ` Eli Zaretskii
2022-04-26 13:24   ` Eli Zaretskii
2022-04-27 14:13     ` dalanicolai
2022-04-27 15:44       ` Eli Zaretskii
2022-04-27 17:13       ` Stefan Monnier
2022-04-27 17:18         ` Eli Zaretskii
2022-04-26 12:49 ` Po Lu
2022-04-27 14:01   ` dalanicolai [this message]
2022-04-28 11:56   ` dalanicolai
2022-04-28 12:06     ` Po Lu
2022-04-28 16:28       ` dalanicolai
2022-04-28 16:48         ` dalanicolai

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='CACJP=3kaF7fnZd9Ncmr3uVQnXAerbNqY5KVP2zvNr7xyYFaQnw@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /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).