texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] eps image is pixelated


From: Miguel de Benito Delgado
Subject: Re: [Texmacs-dev] eps image is pixelated
Date: Fri, 16 Aug 2013 14:58:23 +0200

On 16 Aug, 2013, at 01:04, Michael Lachmann <address@hidden> wrote:

> Because it is cached by CRC, I don't think it should be a problem, unless 
> people are opening the same file at the same time twice, and an image is not 
> cached, yet. But one could create the image and move it to its location at 
> the last moment, and then there should be no issue.

I see. Still some safety check will be needed.

> I noticed that when I open the file above, close it, and open it again, 
> images load fast, which seems to imply that there is already some cacheing 
> going on, as long as you don't quit TeXmacs.

In my machine the file loads fast (<1sec) and I notice no difference between 
first load and subsequent loads after closing the buffer. But scrolling sucks 
because each time the canvas is shifted, Ghostscript is called. Activating the 
in-memory caching system results in perfectly smooth scrolling as if no images 
were there.

Still, 100 of those images would probably be a real pain to load, yes.

Maybe we could simply activate the cache already implemented in 
src/Graphics/Picture/picture.cpp for all images as I suggested, then 
persistently store it?  Note that there already is some infrastructure to this 
end, in src/System/Misc/persistent.cpp. 

For images embedded into files we could do the following: upon load they are 
currently assigned some unique name like 
~/.TeXmacs/system/tmp/tmp_1234567890.eps, then converted using gs. Persistently 
storing the cache would achieve nothing in this situation because it is indexed 
by URL, it'd just fill up the drive. CRC seems the way to go here yes, but then 
the relevant parts of the code relying on these tmp_stuff.bla names could be 
changed to use the CRC as filename, and we may use the current cache and 
persistently store it.

So: persistent storage of the cache in src/Graphics/Picture/picture.cpp and 
by-CRC naming of the temporary files related to embedded images.

Thoughts?

Best,
--
Miguel.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]