Wynntils

Wynntils

966k Downloads

Deleting many waypoints is slow

Toby222 opened this issue ยท 2 comments

commented

When deleting many waypoints (on the order of hundreds) simultaneously, it takes a few seconds for the process to finish.
Importing that many waypoints finishes almost instantly.

Without checking source, I would presume that deleting writes the file after every deleted item, instead of after the whole operation is done, causing significant slowdown.

commented

It might be some kind of O(n^2) operation as well, if we keep searching the list of waypoints from the start each time to find the next waypoint to delete.

commented

Seems my initial thought was correct, as customPois.touched() gets called for each deleted CustomPoi, which writes the waypoints to disk