this is the actual patch.

https://github.com/dmgerman/xournal/commit/40470be71ddf130a6f64ac7581498500cd2d58be

On Wed, Dec 10, 2014 at 1:51 AM, dmg <d...@turingmachine.org> wrote:
> Here is the code I have been working on. I think it works, but needs testing
>
> It is the branch mru
>
> https://github.com/dmgerman/xournal/tree/mru
>
> i did some refactoring of the mru code and added some functions to
> maintain encapsulation.
>
> I also looked into evince. evince uses gvfs to save the page number as
> part of the metadata  of the file. It is a really nice implementation
> that puts the last page opened as part of the file (so to speak).
> the problem is that it only works in linux, not in windows.
>
> --dmg
>
> On Wed, Dec 10, 2014 at 1:40 AM, Denis Auroux <aur...@math.berkeley.edu> 
> wrote:
>> 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
>
>
>
> --
> --dmg
>
> ---
> Daniel M. German
> http://turingmachine.org



-- 
--dmg

---
Daniel M. German
http://turingmachine.org

------------------------------------------------------------------------------
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