openstreetmap-ng icon indicating copy to clipboard operation
openstreetmap-ng copied to clipboard

Async trace compression

Open KonradowyPL opened this issue 9 months ago • 1 comments

Fixes #100

  • All previous compression functions were renamed to precompress accordingly.
  • After precompressing, a task is added using the asyncio.create_task function (not loop.run_in_executor).
  • This function compresses using level 22, then uploads to the database, overrides the previous database entry, and then deletes the previous file.
  • If inserting the new file into the database fails, the new file is deleted so the old one remains.
  • I have tested it regarding error handling, but it might not properly handle some edge cases.

Edit: I have no idea what causes segfault error in cython

KonradowyPL avatar Apr 05 '25 08:04 KonradowyPL

Sent details on Discord, consider the bounty to be 15$ after the changes

Zaczero avatar Apr 05 '25 15:04 Zaczero