[OpenLayers-Users] potential big IE performance enhancement- help!

Andreas Hocevar ahocevar at opengeo.org
Tue May 18 12:10:25 EDT 2010


Hi,

setting cssText is not the same as setting the style. But you could instead try to call

node.style.display = "none";

as first line of the setStyle method, and

node.style.display = "";

as last line of the setStyle method.

Let us know if this also boosts performance.

Good luck,
Andreas.

On May 18, 2010, at 17:58 , mortac8 wrote:

> 
> I think there is a potential to greatly improve the rendering performance  in
> IE (cases of large# of points).
> 
> Take points for example.  In VML.js setStyle, every .style action seems to
> trigger a browser reflow:
> node.style.width="18px"; //1st reflow
> node.style.height="18px"; //2nd reflow
> node.style.top="10px"; //3rd reflow
> node.style.left="10px"; //4th reflow
> 
> I am trying to do: 
> node.style.cssText="width:18px;height:18px;top:10px;left:10px;"; //only 1
> reflow!
> 
> The node.style.cssText only works the first time (when the point is
> initially created and added).  If I zoom on the map, I see my .cssText
> values changing (in IE Developer Tools) but the point always remains at the
> original screen location :(
> 
> I am really pulling my hair out as to why we can't get node.style.cssText to
> take effect after the initial draw.  Any ideas???  
> 
> PS: If I set node.style.cssText, remove the node (removeChild), and then do
> this.vectorRoot.appendChild(node); the styling will be correct however the
> remove&add obviously negate any styling performance gains.
> 
> Help!  Thank you!
> 
> 
> -- 
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enhancement-help-tp5070709p5070709.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list