Dear Shuhao, As far as I can tell the problem is NOT with the xml file but with the display. The solution is to only prepare for display the pages that are necessary; loading the xoj file in its entirety into the xournal data structures is not going to cause all that much RAM consumption in itself, and doesn't cause any of the slowdown upon zooming whatsoever. The RAM consumption and slowdown are largely caused by the internal data structures that gnomecanvas / goocanvas maintain regarding all the graphics in the canvas, even those that are not displayed at a given time. (+ some extra RAM consumption comes from storing rendered PDF backgrounds for all pages that have been visited so far, rather than just those that are currently visible -- but one needs to be smart about that one rather than just discarding stuff from memory, because re-rendering a PDF page is very cpu-intensive).
The solution, therefore, is not to make xournal work on archives of smaller xoj files, but rather to change the tie-up between xournal's internal processing and that of the canvas used to render things, so that canvas structures get created/destroyed when a page becomes needed/no longer needed, rather than when the page is first added to the document / deleted from the document. Denis On 11/22/2013 10:55 AM, Shuhao Wu wrote: > For the problem with file loading, I have that issue. I try to keep my > notes in under 14 pages per file because of this. > > Can't we not have multiple files inside the tar file? This means that > each page (or two pages, whatever the optimal number is) gets its own > xml file. We would only load pages as they are necessary, and even > freeing (on save, as an example). > > Shuhao > > On 11/20/2013 10:24 PM, D M German wrote: >> >> >> >> Wilson> I'm interested to hear the resolution of this resize lag! Because >> of the >> Wilson> limitations of my netbook the memory usage and lag were probably >> the two >> Wilson> issues that impacted my experience the most. >> >> After the exercise to port to goocanvas, I can say that this problem is >> not trivial to solve. >> >> The main problem is that xournal instantiates every single canvas item >> when they are created/loaded from the file. This means that if you are >> low in memory, and your document is large, your computer might start >> trashing. >> >> The resize problem is not as difficult to solve (specially for one page >> viewing). This might be done by resizing the current page interactively >> and the rest of the pages in the background (something that is done >> already for PDF backgrounds). Of course, the programming is not >> trivial, but doable. >> >> >> --dmg >> >> >> -- >> Daniel M. German >> http://turingmachine.org/ >> http://silvernegative.com/ >> dmg (at) uvic (dot) ca >> replace (at) with @ and (dot) with . >> >> >> >> ------------------------------------------------------------------------------ >> Shape the Mobile Experience: Free Subscription >> Software experts and developers: Be at the forefront of tech innovation. >> Intel(R) Software Adrenaline delivers strategic insight and game-changing >> conversations that shape the rapidly evolving mobile landscape. Sign up now. >> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Xournal-devel mailing list >> Xournal-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/xournal-devel >> > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Xournal-devel mailing list > Xournal-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xournal-devel > -- Denis Auroux aur...@math.berkeley.edu University of California, Berkeley Tel: 510-642-4367 Department of Mathematics Fax: 510-642-8204 817 Evans Hall # 3840 Berkeley, CA 94720-3840 ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel