hauke96 / simple-task-manager

A simple tasking manager made for OpenStreetMap.
https://stm.hauke-stieler.de
Other
34 stars 6 forks source link

Performance issue when dividing a task #175

Closed Strubbl closed 2 years ago

Strubbl commented 2 years ago

When i want to change the polygon size in the divide tab, i want to enter a value into the field, e.g. instead of 1000m² i want only 640. I start typing 6 and then my browser freezes. It says result with 4900 tasks is too big, only 1000 allowed. The browser is stuck then. Is it generating the preview? I cannot do anything with the tab anymore and Firefox proposes to stop the scripts on that size.

It would be nice if i can manually enter the polygon size value without my browser freezing.

step to reproduce:

  1. create a project
  2. enter name for the project
  3. use pencil tool to draw a polygon approx. the size of Hamburg
  4. go to tasks tab
  5. click on that task
  6. in subdivide click preview
  7. change the 1000 to e.g. 640
hauke96 commented 2 years ago

Hi, thanks for this problem/bug report.

To your question: Kind of. The drawn polygon is internally divided to calculate the expected number of sub-polygons. A better solution would probably be to either make this smarter/faster (if the framework allows that), to stop dividing, when the threshold of sub-polygons is reached or to move the calculation to the server (which might calculate the sub-polygons faster than the frontend).

I added this issue to the 1.4.3 project and hopefully find a solution soon.