topojson / topojson-client

Manipulate TopoJSON, such as to merge shapes, and convert it back to GeoJSON.
ISC License
213 stars 63 forks source link

topojson.{feature,mesh} without copying points. #6

Open mbostock opened 7 years ago

mbostock commented 7 years ago

One of the biggest performance costs in topojson.feature (and topojson.mesh) is calling array.slice on every point. There are times when this is needed, but in many cases it would be perfectly reasonable to modify the coordinates in-place when applying the transform, and to avoid the copy when creating a feature or mesh. We should design an appropriate API to enable this faster path.

Moved from topojson/topojson#215.