-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Perf] Move away from the APIs that return all tags in one request #528
Comments
I feel there is something wrong with the page layout, if just a thousands (not even millions) of tags is enough to slow the browser. Same goes for the API request. Maybe it will be better in the long run to fix the underlying cause instead of hiding it with pagination? |
I just started to notice a huge slowdown with 5000 or so tags. Looking at the performance of the page, the browser actually spends most of the time waiting for /dashboard/tags, in my case over 9 seconds. |
Well, I went to the drizzle docs, looks like there would be a way to show the query, but as far as I can see it would need to be explicitely added to the hoarder codebase https://orm.drizzle.team/docs/goodies#printing-sql-query. Also there is drizzle-team/drizzle-orm#2605. |
it's unlikely that the problem is in the query itself. Last time we've seen this problem was because of the rendering (and potentially the server side rendering in this case). |
Most likely that's server side rendering taking the time. I can share the queries when I'm in front of the laptop. |
|
Thanks. I have been working with the assumption that the server just spits out json which is then used by the browser. I guess I will have to set up a dev copy and dig into typescript profiling ;) |
so yes, the query does take surprisingly long (1,5 seconds with 5000 tags). Then we calculate the ai/human part, which takes a few ms. |
…arder-app#528 improved the query speed by getting rid of the "with" part of the query and doing that manually
I changed the way the query is done and it reduces the time to below 100ms on my machine. |
@kamtschatka Can you try now after the index fix? |
aaahh, i have checked the index, but was too blind to see the misconfiguration... |
People with thousands of tags are already feeling slowness in viewing their tags or searching through them. This issue is to:
The text was updated successfully, but these errors were encountered: