On 01/17/2011 11:09 AM, Andreas Butti wrote: > I tested this with fast scrolling, I never get more than 100MB used with > my version of Xournal. I opened the same Xournal file, with PDF > background wit the orignal Xournal version, scrolled fast to the end it > used more than 250MByte RAM! (If I scroll slow, e.g. read a document, my > version needs about 40MB RAM!)
That's because the whole PDF backgrounds stay in RAM in the current version. What worries me with your approach is not the PDF backgrounds but the actual things you draw on top. A page of my handwriting is about 50000 line segments, and if you are at 10x zoom level for some reason or other, the page to be rendered can become a bitmap of size of the order of 10000 x 7000, in which you have to draw a lot of anti-aliased line segments (which, at such a zoom level, tend to be pretty thick too). No way that any library can do this in real time. So what happens when you're drawing a stroke on a page that already has a lot of notes, and the display needs to be updated in real time to reflect what you are drawing? Zooming in, and being able to draw at high zoom levels with a good refresh rate, is the reason why I think you really need to be able to refresh only a small part of the page, and selectively send only the items in that part of the page to cairo to process. Denis -- 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 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel