[OpenLayers-Trac] [OpenLayers] #3328: Optimization on vector layer

OpenLayers trac-20090302 at openlayers.org
Fri May 27 06:56:44 EDT 2011


#3328: Optimization on vector layer
--------------------------+-------------------------------------------------
 Reporter:  mosesonline   |       Owner:  crschmidt   
     Type:  feature       |      Status:  new         
 Priority:  minor         |   Milestone:  2.12 Release
Component:  Layer.Vector  |     Version:  2.10        
 Keywords:                |       State:  Review      
--------------------------+-------------------------------------------------
 Some weeks ago I found a bug with the SVG2/NG
 renderer([http://trac.osgeo.org/openlayers/ticket/3257]). Now, while made
 the zooming work, I noticed some improvement potential in the moveTo
 function of OpenLayer.Layer.Vector class.[[BR]]
 The most is removing of variables which are used only once. Such variables
 are great for debugging but not needed.[[BR]]
 The second is the last loop to draw the features. It writes
 renderer.locked attribute in every loop and tries to avoid
 this.features.length-1 in the for-loop header but does this in the next
 line with the ''len'' variable, which both is not needed when you have a
 ''lastIdx'' variable.[[BR]]
 This aren't big changes, but I think it's hot code so optimization should
 be done where possible:)[[BR]]
 I made a patch with this changes, but there also the "fix" for the ticket
 3257 in it, I hope it doesn't bother.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3328>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list