Replies: 3 comments 16 replies
-
WASM - yes, but it didn't find a good place. JS code is pretty fast, my Mac generates a map of default settings in 0.3s. That's with all calculations we have. Graphics is slow, but it's SVG so there is no room for improvement here. |
Beta Was this translation helpful? Give feedback.
-
I had the same idea some time ago, but quickly realized SVG is the bottleneck, the Javascript generator pretty much optimized and fast with those typed arrays. I've experimented with SVG pixel cache (ie. cache svg vector data in hierarchic pixel buffers for view and use SVG for editing only) but I failed to make it smooth and in sync. All fast map services (google maps, leaflet, etc) use this hybrid method: (WMS based) raster accelerated background + thin vector overlay. This feature might be a good place for using WASM + rust. With new browser features like OPFS the pixel cache won't even hog the memory anymore and can be a viable solution. If someone smarter than me (or at least having more time) can do it, that may have a vast performance improvement (Or maybe not. :) Anyways, if you are interested I'm inclined to run an another round, I always wanted to use some rust. |
Beta Was this translation helpful? Give feedback.
-
Agree. SVG engines are ancient and, as fas as I know, no one is working on them. I was hoping Chrome or other team will do the work and give us gpu-optimized engine, but now I'm pretty sure they are not interested in it. SVG is a small niche and what we are doing with it is pretty much extreme. So we basically have 3 options:
|
Beta Was this translation helpful? Give feedback.
-
Have you considered using Rust & WASM for (parts of) generator? This comes from a completely selfish want of mine to use such modules as part of a larger project of mine, but I'm just asking.
Beta Was this translation helpful? Give feedback.
All reactions