Skip to content
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

Fix search hanging and servers page #10

Merged
merged 4 commits into from
Mar 16, 2023
Merged

Fix search hanging and servers page #10

merged 4 commits into from
Mar 16, 2023

Conversation

TheAlienKnight
Copy link
Owner

So, this took a bit actually. Since the redis database is created with non-expiring keys, the cache should be intact, without the need for the methods uploadBots, etc. Once I realized that wasn't the problem, I tested manually adding the page=# to the query on the production site- this resulted in pages of results, that didn't seem to be shown. That was a different issue, that is also resolved in this PR. The random bottleneck/hanging on queries such as "anime" or "furry" occurred when I had created empty/fake datasets to have to search through. This makes sense, since some queries work fine, some not. The issue with some terms is the size of the results. It seems that the bottleneck was coming from .map, and expressjs trying to render everything, all results across every page, synchronously. it seems simply changing the inner function of the map where ejs is called to be asynchronous does the trick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant