Re: Many changes in layers and markers



On Fri, Feb 11, 2011 at 2:02 PM, Jiří Techet <techet gmail com> wrote:
> Now if I created ChamplainMarker inside the layer, what marker should
> I create? ChamplainLabel, ChamplainPoint or ChamplainCustomMarker? The
> point is that any CamplainMarker can be a node of a layer and the
> layer shouldn't prefer any specific marker.

Perhaps it could allow you to choose which type would be nice.

>> So, please fix up the incredi-slow MarkerLayer path rendering, and
>> bring back append_point. Thanks for listening ;-)
>
> So I'll fix the incredibly slow point addition to MarkerLayer but I'll
> probably leave the point addition as it is unless you convince me this
> causes huge performance penalty.

Ok, well I think you might be underestimating python function call
overhead. Guido himself admits that it is quite slow to invoke a
python function, there is a lot of overhead wrt. namespace creation
and related magics. The thing is, you've changed from a system where
I'm calling a single fast C function to a system where I now have to
invoke a python method, which then invokes a bunch of other methods.

Regardless of the speed consideration, I don't like this new method
_at_all_, it's ugly and it wasn't necessary before. I would really
appreciate something like champlain_layer_append_marker that can just
take a lat,lon and do whatever is necessary by itself. It would
simplify my code, making the libchamplain package as a whole more
useful for me.

Tell you what, for now just fix the slow point addition and then I'll
re-profile the code. If you can get the performance back into the
neighborhood of 10 seconds, I'll call it good enough and give you my
blessing. If not, I think a very basic append_marker method that
creates and returns a no-frills ChamplainMarker for polygon creation
would actually go a long way to speeding things up by avoiding several
python function invocations per point loaded.

The creation and addition of points onto the end of a polygon is the
single most performance critical part of my application, and I can't
stress that enough. I had it so finely tuned that you could watch the
polygon be drawn in real-time as it loaded and it only took 6.5s,
shaving it down to 5.79s if you turned off the drawing and waited
until the end to see the polygon. The current system as is takes 21.5
_minutes_ to "draw" the polygon one point at a time (nothing is
actually visible until the end in spite of it "drawing" the whole
polygon twice per point added), and still takes 6 _minutes_ if you
turn off the drawing.

-- 
http://exolucere.ca


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]