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

Make reports load much faster #457

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

DavidMStraub
Copy link
Member

This fixes #451 but was quite painful. I needed to subclass CommandLineReport to remove very costly individual DB calls to every object in the database for multiple reports. This was made harder by Gramps using name mangling in the parent class 🙄

Even with this patched, it was still kind of slow and I realized that for Gramps Web, there is no point in even building the options help for all reports when just showing the list. So I added a new API parameter include_help which defaults to false for /reports/ and true for /reports/<id>. This might seem strange and is strictly speaking not backwards compatible for the API, but it allows a backwards compatible change for Gramps Web, since the frontend doesn't need to be changed.

@DavidMStraub DavidMStraub merged commit 70a1f48 into gramps-project:master Nov 18, 2023
1 check passed
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.

/api/reports is way too slow
1 participant