umap
umap copied to clipboard
uMap Freezes when editing big >2mb OSRM-GPX traces
Describe the bug This is maybe more an unresponsiveness behavior than a bug, literaly speaking : When I try to edit an imported GPX trace >2mb, made with OSRM, uMap will freeze with CPU 100%. After ten seconds or so the browser signals that uMap is not responding, and ask to wait or reload the page. Depending on the size of the GPX trace, the page will recover responsiveness, or will lead to crash of the browser.
- If I reload the page, all my modifications are lost. Obviously
To Reproduce Steps to reproduce the behavior:
- Go to https://umap.openstreetmap.fr/en/map/anonymous-edit/1089775:BrKRjkrNd8G6w-v0AX_7Gy5G8_7TMZhDyWFF-XikqgE (french instance of umap) or https://umap.openstreetmap.de/en/map/anonymous-edit/63092:Rhxx1irDhFVpNx-lNetLQo5ibufeyjHXnPuczC1s0M4 (german instance)
- Click Edit button on top right corner of the view
- Click on Import Button : It is the last button bottom-down the right edge of the screen (an upload arrow)
- Choose a GPX trace >2mb, computed and exported by OSRM tool (https://map.project-osrm.org/)
- The trace is quickly added to a new layer, and shown in uMap
- Zoom and click on that trace (left mouse button) : two small context buttons will show, a pencil and a trashbin
- Click on edit context button (the pencil) : Instantly the page is freezing
Expected behavior Either :
- Allow to edit the trace in matter of seconds
- Says it will take too long to make the trace editable
- Forbid point editing since the trace's too complex for edition
- Offers a way to stop entering in edition mode
- At least not freezing, or at least a way to recover unsaved data...
Desktop : Win10 x64 Brave 1.67.123 Chromium 126 x64
Screenshots of normal behavior
🆗 1) 56 nodes 2489bytes GPX
🆗 2) 1716 nodes, 62kb GPX trace from Namur to Liege
Screenshots of enhancable behavior
⚠3) 29878 nodes, 1.05mb GPX trace from Paris to Berlin
Took 70sec CPU 100% to compute ! Thread reached 1.7gb in memory heap. After that, Chrome is keeping is responsiveness
❌4) 59869 nodes, 2.00mb GPX trace from Paris to Riga, Moscow, Venise
Took 11 minutes to process, thread reached 3.5gb in memory heap After what, UI is stalling, not responsive, objects are not shown correctly, and nothing can be done anymore until the tab is closed
a)
b)
c)
d)
ProcessExplorer :
Desktop : Win10 x64 Firefox 113 x64
❌4) Same but on Firefox (59869 nodes, 2.00mb GPX trace)
Took 16 minutes to process, thread reached 3go in memory heap After what, Firefox is a little more responsive than Chromium, but it takes always two to five minutes for any action
a)
b)
c)
d)
ProcessExplorer :
Additional context You'll find the GPX traces in example here in a zip file : bug umap GPX.zip