umap icon indicating copy to clipboard operation
umap copied to clipboard

uMap Freezes when editing big >2mb OSRM-GPX traces

Open skyrl69 opened this issue 1 year ago • 4 comments

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:

  1. 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)
  2. Click Edit button on top right corner of the view
  3. Click on Import Button : It is the last button bottom-down the right edge of the screen (an upload arrow)
  4. Choose a GPX trace >2mb, computed and exported by OSRM tool (https://map.project-osrm.org/)
  5. The trace is quickly added to a new layer, and shown in uMap
  6. Zoom and click on that trace (left mouse button) : two small context buttons will show, a pencil and a trashbin
  7. 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 image

🆗 2) 1716 nodes, 62kb GPX trace from Namur to Liege image

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 image

❌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) image b) image c) image d) image ProcessExplorer : image

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) image b) image c) image d) image ProcessExplorer : image

Additional context You'll find the GPX traces in example here in a zip file : bug umap GPX.zip

skyrl69 avatar Jul 02 '24 17:07 skyrl69