Rendering the points isn't the issue. I'm happy with the performance, especially using clustering.
The issue is with the refresh strategy, which causes memory issues (it looks like a memory leak) across subsequent updates. Memory usage increases roughly linearly with each update, until the browser crashes. -----Original Message----- From: Zac Spitzer [mailto:[email protected]] Sent: Monday, 23 January 2012 11:27 To: Barker, Hugh (CMAR, Hobart) Subject: Re: [OpenLayers-Users] Performance issues (memory leak?) with WFS You simply can't render large amounts of vector data in a browser, Firefox and Chrome can handle a lot more vector data than IE, but you will always have problems On Mon, Jan 23, 2012 at 10:51 AM, <[email protected]> wrote: > Hi all, > I'm building a web application to display data that is updated in real-time > (ship's navigation/sensor underway data). I'm using WFS (served up by a > Geoserver/PostGIS backend). The core of it looks like this: > > underwayWfsProtocol = new OpenLayers.Protocol.WFS.v1_1_0({ > url: "http://ss-geospatial-hf:8080/geoserver/visage/wfs", > featureType: currentVoyage, > featureNS: "visage", > geometryName: "position"}); > > underwayLayer = new OpenLayers.Layer.Vector("Underway Data", { > strategies: [new OpenLayers.Strategy.BBOX(), new > OpenLayers.Strategy.Cluster({distance: 10}), new > OpenLayers.Strategy.Refresh({interval: 300000, force: true})], > //Refresh screen every 60 seconds, cluster points //TODO - performance > issues > protocol: underwayWfsProtocol, > styleMap: new OpenLayers.StyleMap({ //TODO - dynamic styling based > on zoom level etc, make latest point different > pointRadius: 3, > fillColor: "#ff0000" })}); > > map = new OpenLayers.Map({ > div: "map", > layers: [baseLayer = new OpenLayers.Layer.WMS( > "Bathymetry", > "http://ss-geospatial-hf:8080/geoserver/visage/wms", > {layers: "visage:bathytopo2005tif"})], > center: baseLayerBounds.getCenterLonLat(), > zoom: 4}); > > map.addLayer(underwayLayer); > > I also have some other standard bits and pieces, like a graticule, popups on > feature select and so on. Nothing too unusual. > > My problem is with performance - my development platform is Firefox 9.0.1, > Win7 64. The map and features load fine initially, however after a number of > updates (via the refresh strategy) Firefox's memory usage will balloon, > crashing Firefox (and sometimes my whole system) in fairly short order. I've > tried with both OpenLayers 2.11 and the latest trunk version. > > Any advice would be great - I'm at a bit of a loss. If at all possible I'd > like to stick with the WFS approach, as the functionality is a good fit for > my application vs WMS - just not the performance. > > Cheers, > > Hugh Barker > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
