On 12/10/2013 09:28 AM, Shuhao wrote: > Also, Xournal uses ~500MB of RAM. The file in question is about ~5MB.
Well, you have about a million anti-aliased line segments to render. This is video game territory. Xournal relies on standard rendering libraries which are somewhat optimized for some use cases but not others, not on super-specialized code that optimizes for the GPU. Also, 500 MB of RAM is big, but given that on my laptop Gnome-Shell uses 550 MB (2 GB virtual), I don't think I'm the only one using memory inefficiently. There are three solutions: (1) be patient and avoid zooming in/out all the time -- after all, unless I'm mistaken it's only the initial startup and zoom operations that are slow; (2) split your file into smaller ones, (3) modify in depth the xournal code so that pages are generated into the canvas as necessary, and unless you have near-perfect heuristics for guessing where the user will want to look next, be patient each time a page gets swapped in/out of the canvas since that'll mean generating and rendering about 50K line segments. Continuing to complain about the memory and cpu usage that manipulating a million line segments entail is also perfectly fine if you want, but it's not going to solve your problem. 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 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel