Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Speeding up Goo Canvas

by deadpickle (Pilgrim)
on Apr 14, 2009 at 23:56 UTC ( [id://757513]=note: print w/replies, xml ) Need Help??


in reply to Re: Speeding up Goo Canvas
in thread Speeding up Goo Canvas

Good Q. I guess some more explanation is in order. There is way to much data in the Tiger shapefiles to load them on the spot. I wrote an extractor that removes the parts of the shapefile that are within the bounds. These lines are wrote to a file in SVG form. These lines are then loaded into the main program by reading the files and dropping them into a PATH call. So the slowdown (that visual delay as you watch the shapefiles shift) occurs when you scroll and zoom. so given that the slow down is when you move it I would guess that its not the drawing but the calculation. I am just guessing. Thoughts? It really might be good to figure this out but without speculating I'm not sure how to. Any ideas?

UPDATE: Would there be any loading benefits (speed wise, the click ability of SVG would be useful to display the names of the streets) to using the SVG module and either loading it on to a new layer in goo canvas or even creating an SVG image (if its possible) and loading that as a background. Thoughts?

I also noticed that there is a render call in goo canvas. Would it be possible to render only the area in the window (by render I mean hide everything outside the window)? If this is not possible since there is a scale call in render is it possible to hide some of the roads when the zoom is a certain value? If so what would be the cairo context call?

Replies are listed 'Best First'.
Re^3: Speeding up Goo Canvas
by zentara (Archbishop) on Apr 15, 2009 at 12:59 UTC
    If you havn't asked yet, try the gtk2-c and gtk2-perl maillists. Remember, Goo is still in early developmental stages...and probably needs alot of efficiency improvements.....but it's tough to get the author to do it for free. :-( Me? Just flying by,.....thoughts?... if you think about the problem for a few months, you probably can come up with some hack to make it faster, like using shared memory segments to hold the common data, then use threads to manipulate the grid data. But to be honest, this stuff probably should be written with the c version of the Goo library. Perl tacks on alot of baggage on the math calculations needed.

    But that is what is great about Gtk2, you can prototype in Perl, then rewrite in c......the gtk2-c tutorials are very easy to understand, especially now that you know Perl/Gtk2.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://757513]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found