Skip to content

Commit

Permalink
Do not make defensive copy of GeoJSON
Browse files Browse the repository at this point in the history
Copy of large GeoJSON is major performance bottleneck during digest cycle
  • Loading branch information
kherrala committed Nov 14, 2015
1 parent 0695e78 commit 60d9dde
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/directives/geojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 60d9dde

Please sign in to comment.