hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
6.63k stars 240 forks source link

long delay when selecting tags in UI #382

Closed cirrusflyer closed 1 month ago

cirrusflyer commented 2 months ago

I have nearly 4000 bookmarks, so a lot of tags. When I select the "Tags" on the left UI menu, it takes around 14 seconds to display the list. Hoarder is running on a server with a Celeron N5105, 16 GB RAM, and SSD storage.

kamtschatka commented 2 months ago

This is most likely not related to the database query/your server, but rather on the UI showing all those tags. How many tags do you have? Should you not have less tags than bookmarks, to keep everything grouped together?

cirrusflyer commented 2 months ago

I have too many tags to count. Is there a way to get a count?

cirrusflyer commented 2 months ago

Looks like over 6000 tags based on a copy and paste to another file and counting the rows.

kamtschatka commented 2 months ago

yeah, i was able to reproduce the issue, with 4000 tags that I added directly in the datbase and rendering took about 5 seconds for me. I optimized the code and got it to below 2 seconds. Maybe someone else with more knowledge of React has better ideas, but at least it improved quite a bit already.

cirrusflyer commented 2 months ago

That's a big improvement! Will that be pushed to Docker soon?

kamtschatka commented 2 months ago

Depends on: