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

Optimize getEvent methods to decrease query time #190

Merged
merged 14 commits into from
Apr 22, 2024

Conversation

jallentxbiomed
Copy link
Collaborator

@jallentxbiomed jallentxbiomed commented Apr 11, 2024

  • getAllPackageCategories will return a cached map of packageCategories to refrain from retrieving them for each package
  • New method override for addExtraFieldsToPackage to getextraFields for packages before any other operation to save from retrieving it every time
  • getFullPackages and getFullPackage get the package info from cached superPackages instead of database
  • New getEvent override method that uses the more optimized narrativeCache methods to get event info
  • getAllFullSuperPkgs now accounts for either full database if eventId is null or select superPkgs for an eventId
  • getAllEventData now receives a cached map of eventData objects instead of recursively retrieving eventData from database every time
  • getChildEventData receives cached map instead of querying database
  • SNDServiceImpl now calls the new override method for getEvent

Related JIRA Issue:

Copy link
Collaborator

@spamhurts spamhurts left a comment

Choose a reason for hiding this comment

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

Looks good!

src/org/labkey/snd/SNDManager.java Outdated Show resolved Hide resolved
@spamhurts spamhurts self-requested a review April 17, 2024 19:00
@spamhurts spamhurts self-requested a review April 19, 2024 14:59
@jallentxbiomed jallentxbiomed merged commit b368be5 into release23.11-SNAPSHOT Apr 22, 2024
1 check passed
@jallentxbiomed jallentxbiomed deleted the 23.11_fb_optimizeGetEvent branch April 22, 2024 20:47
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.

3 participants