[OpenLayers-Users] Huge amount of data crashing browser
Christopher Schmidt
crschmidt at metacarta.com
Tue Nov 17 10:25:17 EST 2009
On Mon, Nov 16, 2009 at 11:22:20PM -0200, Pedro Baracho wrote:
> I know GeoServer is different from OpenLayers, but what I am questioning is
> how big is that impact on rendering data.
> I have a development environment on my machine consisting of Apache Tomcat
> and GeoServer.
> This same machine is running the Browser that accesses OL code.
>
> The vector data is hosted on a Oracle server on a different machine.
>
> I find weird that Geoserver, running on my machine, can retrieve the vector
> data from Oracle Server, render an image and deliver it to the browser,
> while the browser itself, can't take the XML and render an image.
The browser *isn't rendering an image*. That's the key difference. (And
in fact, the browser probably could render an image like this -- via the
Canvas technology -- but OpenLayers doesn't have an implementation which
makes this possible.)
> And it is
> not a performance issue. It simply consumes all my physical memory (that is
> something like 4.5+ gb) and FF crashes, without any warning or error logging
> from OL.
That sounds exactly like a performance issue to me. "Large use of memory"
is performance related.
The browser is generating an SVG document. If GeoServer could generate SVG
(I don't know if it can) and you were to open the resulting, complex,
SVG document in Firefox, it is likely you would see similar behavior.
It wouldn't be exactly the same because OpenLayers does *much more* to ensure
that the data you download from GeoServer is usable in the browser --
adding events, mapping colors, drawing based on style rules, etc. In
addition, this manipulation is done through a notoriously heavy API --
the DOM.
Rasterizing an image and vectorizing a set of data are two entirely
different tasks, with different use cases, and different performance
metrics.
> I know that rendering and delivering an image is a lot simpler than building
> nested divs and image tags, parsing XML, etc. Even more if you compare Java
> to Javascript. But is it really "4gb+ simple"? That is what I find weird.
Yes. It really is. Welcome to the browser.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list