Re: Many changes in layers and markers
- From: Robert Park <rbpark exolucere ca>
- To: Russell Strong <russell strong id au>
- Cc: libchamplain-list gnome org
- Subject: Re: Many changes in layers and markers
- Date: Sat, 12 Feb 2011 23:49:05 -0700
On Sat, Feb 12, 2011 at 11:38 PM, Russell Strong <russell strong id au> wrote:
> A call which modifies the scenegraph, for the want of a better word,
> causes an timer function to be added to do the redraw. Timer could be
> set to immediately expire. The important thing is that scenegraph
> modification is separated from rendering.
I don't totally follow your flowcharts here, but I think I agree with the idea.
How things were working before was that my GPX parser would call
ChamplainPolygon.append_point thousands of times per second, and the
screen wouldn't redraw in this time because the Gtk mainloop hadn't
iterated. Then every 0.2s, I'd do a "while Gtk.events_pending():
Gtk.main_iteration()" to get the display updated and the polygon
rendered to the screen. Things were really speedy, I could append
40,000 points in 6 seconds. Now it's taking 6 minutes to load those
same points.
Anyway, I'm in full support of any method that can be used to make
slow code only execute when necessary, and not every single point
added. ;-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]