[Pkg-javascript-commits] [leaflet-markercluster] 262/479: Make add-1000-after use addLayers to be even faster

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit a1a2a99519268f19e86025b0ae6662e4d3360120
Author: danzel <danzel at localhost.geek.nz>
Date:   Thu Oct 11 10:15:58 2012 +1300

    Make add-1000-after use addLayers to be even faster
---
 example/old-bugs/add-1000-after.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/example/old-bugs/add-1000-after.html b/example/old-bugs/add-1000-after.html
index 730d7d8..03fbb88 100644
--- a/example/old-bugs/add-1000-after.html
+++ b/example/old-bugs/add-1000-after.html
@@ -58,9 +58,9 @@
 			}
 
 			var start = +new Date();
-			for (i = length - 1; i >= 0; i--) {
-				markers.addLayer(list[i]);
-			}
+
+			markers.addLayers(list);
+
 			var end = +new Date();
 
 			document.getElementById('time').innerHTML = 'Creating 1000 markers took: ' + (start - prestart) + 'ms . Appending 1000 markers took: ' + (end - start) + 'ms';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list