From 60d9ddec0eb079bc7c986a930a4e55402e45e848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyo=CC=88sti=20Herrala?= Date: Sat, 14 Nov 2015 13:42:00 +0200 Subject: [PATCH] Do not make defensive copy of GeoJSON Copy of large GeoJSON is major performance bottleneck during digest cycle --- src/directives/geojson.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/directives/geojson.js b/src/directives/geojson.js index 0c5fb5c1..71f71b63 100644 --- a/src/directives/geojson.js +++ b/src/directives/geojson.js @@ -66,8 +66,7 @@ angular.module('leaflet-directive') _remove(leafletGeoJSON); }; - var _addGeojson = function(model, maybeName) { - var geojson = angular.copy(model); + var _addGeojson = function(geojson, maybeName) { if (!(isDefined(geojson) && isDefined(geojson.data))) { return; }