maplibre / maplibre-rs

Experimental Maps for Web, Mobile and Desktop
Apache License 2.0
1.34k stars 77 forks source link

Refactor Transferables definition #260

Open maxammann opened 1 year ago

maxammann commented 1 year ago

The current transferables definition requires several copies such that data form a WebWorker reaches the main thread. We can improve here by directly tesselating into a destination buffer which is then sent to the main thread.

The minimum amount of copies is 2! We currently do more than 4 probably.

🤔 Expected Behavior

Zero-copy (/2 copies)

😯 Current Behavior

Many copies.

💁 Possible Solution

🔦 Context

None