auto-sort-bookmarks-webext icon indicating copy to clipboard operation
auto-sort-bookmarks-webext copied to clipboard

Auto Sort is slow on huge boomark set (restore delta sort)

Open Morikko opened this issue 4 years ago • 2 comments

If the auto sort function is on then any change on the bookmark is getting really slow.

Based on the code, I suspect that it sorts all the bookmark all the time and it takes seconds for my set.

I do not know the API by heart but I suspect that it should be possible to know which bookmark changed (CUD) and to sort only the changed bookmark folder level.

Note: I would even think that a delete should not require a sort as the elements were already sorted.

Morikko avatar Nov 09 '21 14:11 Morikko

Originally, that's how Auto-Sort Bookmarks (ASB) worked. The problem was there are edge cases where bookmarks would not get sorted, so logic was added but this didn't always work and caused other problems (like corruption). For the sake of simplicity and stability, it does a delayed sort (wait for no activity, then sort). I had planned to restore the delta sort, but haven't gotten around to it yet.

eric-bixby avatar Nov 09 '21 21:11 eric-bixby

Of course, continuing to prevent corruption needs to be of the highest priority!

Gitoffthelawn avatar Jan 26 '22 06:01 Gitoffthelawn