all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* AW: Re: Free images based on allocated memory
@ 2019-01-31 17:33 Andreas Politz
  2019-01-31 20:14 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Politz @ 2019-01-31 17:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

Yes, I know about image eviction delay.  Also, I'm not really sure if what I was proposing is a good idea.

One goal in my package is it to display PDF pages quickly. 
There are 2 factors delaying this:  The actual rendering in the back-end (via poppler) and the loading of the image by Emacs.  

In order to limit this timespan, pages are speculative pre-rendered and pre-loaded. E.g. if page n is currently displayed, the user probably wants to view page n+1 next. This is implemented by filling  a LRU cache while Emacs is idle.

Note how this conflicts with a least-recently-displayed eviction strategy.

Of course this can be solved in Lisp, just not very elegantly.  I spare you the details.

Another extension point, which would help managing the image-cache in my case, would be the ability to flush images based on their data.  Note, this is currenly only supported for file based images.

Thanks for taking the time,
Andreas

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: AW: Re: Free images based on allocated memory
  2019-01-31 17:33 AW: Re: Free images based on allocated memory Andreas Politz
@ 2019-01-31 20:14 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-01-31 20:14 UTC (permalink / raw)
  To: Andreas Politz; +Cc: emacs-devel

> Date: Thu, 31 Jan 2019 18:33:28 +0100
> From: Andreas Politz <politza@hochschule-trier.de>
> Cc: emacs-devel@gnu.org
> 
> Yes, I know about image eviction delay.  Also, I'm not really sure if what I was proposing is a good idea.
> 
> One goal in my package is it to display PDF pages quickly. 
> There are 2 factors delaying this:  The actual rendering in the back-end (via poppler) and the loading of the
> image by Emacs.  
> 
> In order to limit this timespan, pages are speculative pre-rendered and pre-loaded. E.g. if page n is currently
> displayed, the user probably wants to view page n+1 next. This is implemented by filling  a LRU cache while
> Emacs is idle.
> 
> Note how this conflicts with a least-recently-displayed eviction strategy.
> 
> Of course this can be solved in Lisp, just not very elegantly.  I spare you the details.

Thanks for the explanations, but I'm not sure I understand: is the
patch you proposed intended to fix these issues?  If so, can elaborate
on how it fixes them?

> Another extension point, which would help managing the image-cache in my case, would be the ability to flush
> images based on their data.  Note, this is currenly only supported for file based images.

Doesn't image-flush fit this bill?  If not, can you tell why not?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-31 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31 17:33 AW: Re: Free images based on allocated memory Andreas Politz
2019-01-31 20:14 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.