Le 11/03/2017 à 20:16, Pavel Sanda a écrit :
Guillaume Munch wrote:
On the other hand, for graphics, the
idea of the previous FileMonitor could be adapted to refresh graphics
when they appear on the screen

Perhaps. But it should do that when window gets active (we already catch that
signal for redrawing graphics).
Typical scenario I am in: plotting routine in terminal window changes figs
and I want to see them updated after I switch from terminal back to lyx.

It now checks for modifications using timestamp and checksum whenever
drawn (asynchronously) but not more than once every 10s.

I chose a big interval because it is only useful for cases where
QFileSystemWatcher does not work.

If QFileSystemWatcher works, you see the modification instantly. If it
does not, you now see it when you activate the window.



(but stop doing it when they leave the screen).

Of course, there is no reason for that.

Well, this is what the old code was doing.


In that case, I even wonder whether it is useful to use the file
monitor for graphics files.

It seems to me safer still use them, but don't have strong opinion.

BTW do you think it would be hard to paralelize the load of the figures
in the previewer machinery? I have lot of reports with hundreds of figs
and loading the document with all figs takes mins while only one of my
cores is busy.

I am not familiar enough with this part. Are they graphics or previews?
If graphics, does increasing s_numimages_ and decreasing s_millisecs_ in
graphics/GraphicsLoader.cpp help?


Guillaume

Reply via email to