[Talk-GB] Pigging potlach ...

John Sturdy jcg.sturdy at gmail.com
Wed Jan 11 13:54:28 GMT 2012


On Wed, Jan 11, 2012 at 11:40 AM, Richard Fairhurst
<richard at systemed.net> wrote:

> I think there's always been a memory leak there with P2; I've noticed that
> sort of behaviour for months. I've only done minimal bits of delving into
> it, but suspect it's a case of _either_ some sprites being left on the
> display list (maybe the invisible sprites which P2 uses to define "hit
> zones" for each way/node), or that the "event listeners" by which Flash
> responds to mouse clicks (and other events) aren't being cleared properly.

Something like one of those would be consistent with what I'm seeing.
It doesn't happen on a larger machine, so I don't think it's just a
matter of the hit zone algorithm scaling poorly.

> Unfortunately it's not trivial to debug - I think this sort of thing is the
> way that Adobe makes their money from Flash (i.e. you need to buy Flash
> Builder for the profiling tools). But that's not to say it's impossible, and
> I'd very much like to do so.

Another oddity I've noticed (also probably deep within Flash) is that
P2 sometimes either doesn't respond to a keypress but does to the
corresponding mouse click, or just responds much slower to the
keypress.  (I notice this with "add" in advanced mode, versus the "+"
key.)  But I guess that by its nature Flash is more mouse-oriented
than keyboard-oriented, so this may be inherent to Flash rather than
specific to P2.

> (Incidentally, one simple thing you can do to speed P2 up is to clear any
> GPS traces you're no longer using - it's easy to forget that you have, in
> effect, a whole bunch of 1000-node ways sitting around!)

I don't think that's what's happening here (I get the effect without
any GPS traces loaded).

>> I can investigate further if you like, but are people concerned
>> with such small machines (other than as thin clients) these
>> days anyway?
>
> Please do. I am interested, definitely - P2 should aim to run efficiently on
> any machine :) (and it's not entirely altruistic, as one of the machines I
> use regularly is a 2004 PowerPC Mac).

Next time it does it, I'll run "top" and get the process size, memory
usage, etc, for a start.

__John



More information about the Talk-GB mailing list