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 analyzer result querying performance #3012

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jkppr
Copy link
Collaborator

@jkppr jkppr commented Jan 4, 2024

The analyzer results are currently requested per timeline when a sketch is loaded. This results in some scaling issues when working with a sketch that has many timelines.

This PR improves the loading performance by adding a new API endpoint that returns only the latest analyzer session for each timeline and analyzer on a given sketch.

  • Adding a LatestAnalyzerSketchResource API endpoint.
  • Load analyzer results via the new API endpoint
  • Fixing a small front-end bug

* Load analyzer results via the new API endpoint
* Fixing a small frontend bug
@jkppr jkppr added the Analyzers label Jan 4, 2024
@jkppr jkppr requested a review from berggren January 4, 2024 12:45
@jkppr jkppr self-assigned this Jan 4, 2024
for timeline in sketch.timelines:
for analyzer_name in sketch_analyzer_names:
analysis_history = (
Analysis.query.filter_by(timeline=timeline, name=analyzer_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you find a way to make this into a more efficient query instead of loop in code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly not. Still looking into it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants