
On Thu, Jul 2, 2009 at 2:04 PM, Vangelis Katsikaros wrote:
Hello!
My name is Vangelis Katsikaros. I have worked a bit with Nathan Hurst (he was kind enough to provide feedback and guidance) in lib2geom on the direction of making Inkscape more efficient when a lot of "shapes" are in a file.
Currently Inkscape looks *all* the shapes in order to find which are in the user's window (correct me if I am wrong). This is actually a spatial 2D query and has been solved efficiently in GIS database systems. Now, lib2geom offers a simple R-Tree solution, allowing for 2D spatial querying. There are still a couple of small tasks to do, and then we should go from memory-only indexing to memory-and-disk indexing (so the project isn't complete yet :)
After we have an efficient way to find what must be rendered, the 2nd issue is rendering more efficiently. Nathan suggested that mipmaps could be incorporated in the R-Tree thus allowing to pre-render small shapes (related to the user's window).
I still have more work to do (to finish the rtree) and then are many paths to follow. Any comments or thoughts would be interesting :)
The only comment here would be: when do we have this in Inkscape? :D
A quick test the sK1 team did recently with a file containing 20K circles. The use of memory is:
sK1 - 145 Mb CorelDRAW X3 - 210 Mb Inkscape - >1000 Mb
Alexandre