Denis> 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.
Denis> Yes, this is the case -- but it's harder to fix: besides Denis> re-reading it before updating, when we update it we need to do Denis> so not just in memory but also on disk. So each MRU update Denis> becomes: read from disk, update in memory, write to disk. The Denis> issue is that, with multiple instances running simultaneously Denis> and accessing the same MRU file fairly frequently, there is a Denis> risk of the file getting corrupted -- so we need to get an Denis> exclusive file lock during the read/update/write process. Yes, the issue of a run condition is there, but I think that is not hard to fix. The real problem is merging the lists. This require more complex logic and keeping track of when a file has been opened. >> 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. Denis> This is why the MRU normally only gets updated in memory -- then Denis> it's just one small thing to keep track of, much less work than Denis> updating the display. (But I think the only issue with updating Denis> on disk is spinning the hard disk on laptops that still have Denis> those.) We could do just a memory update when only the page Denis> number changes. But all in all it gets quite complicated. Not Denis> sure if I'm motivated to get it 100% right, it's not the most Denis> crucial feature. I agree with Denis. I don't think it is worth saving the MRU all the time. The only thing it adds is the ability to keep the MRU in case that xournal is killed (or crashes). -- Daniel M. German "Much of my work has come John W. Backus -> from being lazy" http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/xournal-devel
