Esri/terraformer-arcgis-parser — pull request #4 by patrickarlt (2013-09-17 15:10:00+00:00)
Title: Performance improvements

`JSON.parse` and `JSON.stringify` are REALLY slow especially in IE. This was causing problems in Esri Leaflet.

This fixes these issues by doing a shallow clone of the properties/attributes and using splice to clone coordinate arrays.

### Before
ArcGIS Point to GeoJSON Point x 152,239 ops/sec ±0.21% (101 runs sampled)
ArcGIS Polyline to GeoJSON LineString x 142,185 ops/sec ±0.26% (100 runs sampled)
ArcGIS Polygon to GeoJSON Polygon x 144,814 ops/sec ±0.33% (97 runs sampled)
ArcGIS Multipoint to GeoJSON Multipoint x 166,162 ops/sec ±0.32% (101 runs sampled)
ArcGIS Polyline w/ 2 Paths to GeoJSON MultiLineString x 142,180 ops/sec ±0.41% (100 runs sampled)
ArcGIS Polygon w/ 2 Rings to GeoJSON MultiPolygon x 88,042 ops/sec ±0.10% (103 runs sampled)
ArcGIS Polygon w/ Holes into GeoJSON MultiPolygon x 42,877 ops/sec ±0.32% (97 runs sampled)
ArcGIS Feature to GeoJSON Feature x 62,839 ops/sec ±0.14% (102 runs sampled)
GeoJSON Point to ArcGIS Point x 359,028 ops/sec ±0.29% (100 runs sampled)
GeoJSON LineString to ArcGIS Polyline x 227,755 ops/sec ±0.21% (101 runs sampled)
GeoJSON Polygon to ArcGIS Polygon x 180,404 ops/sec ±0.32% (99 runs sampled)
GeoJSON Polygon w/ hole to ArcGIS Polygon x 110,150 ops/sec ±0.12% (101 runs sampled)
GeoJSON Multipoint to ArcGIS Multipoint x 241,153 ops/sec ±0.31% (99 runs sampled)
GeoJSON MultiLineString to ArcGIS Polyline x 168,258 ops/sec ±0.10% (99 runs sampled)
GeoJSON MultiPolygon to ArcGIS MultiPolygon x 126,248 ops/sec ±0.29% (100 runs sampled)
GeoJSON MultiPolygon w/ hole to ArcGIS Polygon x 81,272 ops/sec ±0.09% (103 runs sampled)
GeoJSON Feature to ArcGIS Feature x 78,559 ops/sec ±0.31% (101 runs sampled)
GeoJSON Feature Collection to Array of ArcGIS Features x 21,077 ops/sec ±0.55% (98 runs sampled)
GeoJSON Geometry Collection to Array of ArcGIS Geometries x 47,102 ops/sec ±0.32% (100 runs sampled)

### After
ArcGIS Point to GeoJSON Point x 478,834 ops/sec ±0.32% (97 runs sampled)
ArcGIS Polyline to GeoJSON LineString x 889,808 ops/sec ±0.38% (102 runs sampled)
ArcGIS Polygon to GeoJSON Polygon x 862,266 ops/sec ±0.75% (98 runs sampled)
ArcGIS Multipoint to GeoJSON Multipoint x 876,420 ops/sec ±0.77% (89 runs sampled)
ArcGIS Polyline w/ 2 Paths to GeoJSON MultiLineString x 902,690 ops/sec ±0.28% (98 runs sampled)
ArcGIS Polygon w/ 2 Rings to GeoJSON MultiPolygon x 436,473 ops/sec ±0.42% (101 runs sampled)
ArcGIS Polygon w/ Holes into GeoJSON MultiPolygon x 305,958 ops/sec ±0.27% (96 runs sampled)
ArcGIS Feature to GeoJSON Feature x 408,392 ops/sec ±0.15% (102 runs sampled)
GeoJSON Point to ArcGIS Point x 7,282,506 ops/sec ±6.26% (61 runs sampled)
GeoJSON LineString to ArcGIS Polyline x 2,535,231 ops/sec ±6.20% (54 runs sampled)
GeoJSON Polygon to ArcGIS Polygon x 1,510,240 ops/sec ±0.51% (99 runs sampled)
GeoJSON Polygon w/ hole to ArcGIS Polygon x 922,806 ops/sec ±2.00% (95 runs sampled)
GeoJSON Multipoint to ArcGIS Multipoint x 2,849,333 ops/sec ±4.02% (59 runs sampled)
GeoJSON MultiLineString to ArcGIS Polyline x 1,878,648 ops/sec ±1.63% (91 runs sampled)
GeoJSON MultiPolygon to ArcGIS MultiPolygon x 780,231 ops/sec ±0.69% (94 runs sampled)
GeoJSON MultiPolygon w/ hole to ArcGIS Polygon x 617,936 ops/sec ±1.32% (90 runs sampled)
GeoJSON Feature to ArcGIS Feature x 997,783 ops/sec ±1.41% (94 runs sampled)
GeoJSON Feature Collection to Array of ArcGIS Features x 337,374 ops/sec ±0.47% (100 runs sampled)
GeoJSON Geometry Collection to Array of ArcGIS Geometries x 715,263 ops/sec ±0.42% (97 runs sampled)