Hi Michael,

> the discussion on MRU reminded me of another problem, namely that if one
> is running multiple instances of Xournal then the MRU file tends to be
> overwritten instead of extended. I do not know of the top of my head if
> this is still the case. If yes then perhaps the MRU list should be
> re-read before updating.

Yes, this is the case -- but it's harder to fix: besides re-reading it 
before updating, when we update it we need to do so not just in memory 
but also on disk. So each MRU update becomes: read from disk, update in 
memory, write to disk.  The issue is that, with multiple instances 
running simultaneously and accessing the same MRU file fairly 
frequently, there is a risk of the file getting corrupted -- so we need 
to get an exclusive file lock during the read/update/write process.

> Regarding updating the MRU file after each page change, I  wonder if
> this could be a bit taxing in terms of power consumption on low-end devices.

This is why the MRU normally only gets updated in memory -- then it's 
just one small thing to keep track of, much less work than updating the 
display. (But I think the only issue with updating on disk is spinning 
the hard disk on laptops that still have those.) We could do just a 
memory update when only the page number changes. But all in all it gets 
quite complicated. Not sure if I'm motivated to get it 100% right, it's 
not the most crucial feature.

Best,
Denis

-- 
Denis Auroux
UC Berkeley, Department of Mathematics     aur...@math.berkeley.edu 

Institut Henri Poincare, Paris             aur...@ihp.fr

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to