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

Improve history performance #605

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Improve history performance #605

merged 1 commit into from
Feb 6, 2024

Conversation

goto-bus-stop
Copy link
Member

@goto-bus-stop goto-bus-stop commented Feb 6, 2024

It takes like 1s to load the first page of history on wlk.yt, I suspect because it uses mongoose .populate(). Frankly the way the history storage is designed isn't very suitable for mongodb, but we can improve the situation by doing the population inside the DB using $lookup aggregation stages. I still hope to switch to a relational database in the future.

@coveralls
Copy link

Coverage Status

coverage: 80.26% (-0.2%) from 80.44%
when pulling c717019 on history-perf
into 9d9d071 on default.

@goto-bus-stop goto-bus-stop merged commit f2ef7fc into default Feb 6, 2024
16 of 18 checks passed
@goto-bus-stop goto-bus-stop deleted the history-perf branch February 6, 2024 17:45
@goto-bus-stop
Copy link
Member Author

Honestly not sure if that worked :s

Running the queries in mongosh is snappy. Maybe something else causes it.

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.

None yet

2 participants