From 4d72137e123f13d7ad3c2c32396d9c7a3d9fc657 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 22 Mar 2014 03:42:59 +0000 Subject: [PATCH] render queue: when using canvas-based L.Path-s, it's most efficient to draw as much as possible every time - so quick-n-dirty change to the batch limits --- code/map_data_request.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/map_data_request.js b/code/map_data_request.js index 4012b325..25746ddd 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -53,7 +53,8 @@ window.MapDataRequest = function() { // render queue // number of items to process in each render pass. there are pros and cons to smaller and larger values - this.RENDER_BATCH_SIZE = (typeof android === 'undefined') ? 2000 : 500; + // (however, if using leaflet canvas rendering, it makes sense to push as much as possible through every time) + this.RENDER_BATCH_SIZE = L.Path.CANVAS ? 1E9 : (typeof android === 'undefined') ? 2000 : 500; // delay before repeating the render loop. this gives a better chance for user interaction this.RENDER_PAUSE = 0.05; //50ms