[ka-Map-users] Re: Canvas memory usage?

Justin George justin.george at gmail.com
Tue Jun 27 11:29:24 EDT 2006


I found the problem, actually. I was calling it before the map had
fully initialized, and so it was trying to render a very, very large
canvas (~12000 by 6000 pixels)

I believe this is a known problem, eg, if you are zoomed in, and you
look at a large polygon, the overlays use substantial memory.
Hopefully in the future I'll be able to pass a convex hull of the
intersection of the geometry with the extents on the screen, which
will fix this. Of course, that's all on the spatial database side of
things.

Thanks again
J

On 6/27/06, Pg <pg.navone at gmail.com> wrote:
> I did a quick check using Firefox 1.5 on Windows 2k, and the memory
> usage seems to be stable when I display canvas objects.
>
> I'll do some tests on Linux, but in the development and debug I've
> never noted a so big memory jump.
>
>
> 2006/6/27, Justin George <justin.george at gmail.com>:
> > I'm having a problem isolating why canvas is using so much memory.
> >
> > Currently, on firefox 1.5, when a canvas is created using the line
> >
> > (in kaXmlOverlay.js, line 1053, kaXmlPolygon.prototype.draw_canvas)
> >
> > var ctx = _BrowserIdent_getCanvasContext(this.canvas);
> >
> > memory usage jumps by around 200mb. This is not important for
> > development, but, as most of our target users have far less memory
> > than this, it is becoming important as we move towards deployment.
> >
> > You're the resident canvas expert, PG, so perhaps you could shed some
> > light on the behavior of canvas?
> >
> > Thanks
> > J
> >
>


More information about the ka-Map-users mailing list