[openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

David Tsiklauri notifications at github.com
Wed Mar 19 13:36:38 UTC 2025


nertc left a comment (openstreetmap/openstreetmap-website#5009)

You are right, I thought, it disabled both asynchronous functionalities.
I pulled `master` and tested turning asynchronous loading off.

1. About flash: it is because data is loaded asynchronously and as everything is rendered one by one (and not as one operation that may cause freezing of the website), on fast machines it may be perceived as a flash.
2. About performance: these are several rendering test results from my local machine:
    ```
    3260 features | 178ms -> 328ms (~1.8x)
    3163 features | 169ms -> 264ms (~1.5x)
    2319 features | 114ms -> 196ms (~1.7x)
    ```
    Therefore, on average previously it was 1.7x faster (which is logical, because now it is asynchronous and is not done in one operation).

But in terms of redrawing all of the features, when map is moved, there was no change that would impact that behavior. Even after turning asynchronous functionality off, all of the features were still redrawn.

Turning asynchronous functionality off will solve flash problem, but redrawing all the features will stay the same. Though, for those who have weaker CPUs (for example when I run performance test on `CPU 20x slowdown`), rendering data asynchronously helps user not to have frozen web page and browser. I think, if you suggest turning this functionality off or some optimization about rendering data, it will be better to be discusses in a separate issue.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5009#issuecomment-2736676415
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5009/c2736676415 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250319/80d9f150/attachment.htm>


More information about the rails-dev mailing list