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

[v8r0] Improve getTransformationFiles performance #7812

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

chrisburr
Copy link
Member

This significantly improves the performance of getTransformationFiles by:

  • Using a JOIN instead of manually looking up the LFNs from file IDs
  • Remove the batching that was needed due to the use of __getFileIDsForLfns
    • This is doubly helpful as the use of OFFSET N LIMIT 10000 made the function O(N^2) due to the database having to rebuild and scan the results for every batch.
  • Giving the option to only get the columns you need

For example in LHCb: this optimises a ~1200 second call to be ~20 seconds.

BEGINRELEASENOTES

*TransformationSystem
NEW:
CHANGE: Improve getTransformationFiles performance

ENDRELEASENOTES

@DIRACGridBot DIRACGridBot added the alsoTargeting:integration Cherry pick this PR to integration after merge label Oct 2, 2024
@chrisburr chrisburr force-pushed the perf-getTransformationFiles branch 2 times, most recently from 3f1c5f0 to ddf159b Compare October 2, 2024 13:13
@chrisburr chrisburr marked this pull request as ready for review October 2, 2024 13:13
@chrisburr chrisburr changed the title [master] Improve getTransformationFiles performance [v8r0] Improve getTransformationFiles performance Oct 2, 2024
@chrisburr chrisburr force-pushed the perf-getTransformationFiles branch from ddf159b to b24a791 Compare October 2, 2024 13:23
@chrisburr chrisburr force-pushed the perf-getTransformationFiles branch 2 times, most recently from 9078b1c to bc47ed7 Compare October 3, 2024 08:38
fstagni
fstagni previously approved these changes Oct 7, 2024
@chaen chaen dismissed fstagni’s stale review October 8, 2024 09:30

Apparently, Chris found something wrong

@chrisburr chrisburr force-pushed the perf-getTransformationFiles branch from 0e47bdb to 836e34c Compare October 8, 2024 20:31
@chrisburr
Copy link
Member Author

I've rolled back incorrect commit and added the comment as suggested in #7812 (comment) so this should be good to go

@chaen chaen merged commit c35d052 into DIRACGrid:rel-v8r0 Oct 14, 2024
26 checks passed
@DIRACGridBot DIRACGridBot added the sweep:done All sweeping actions have been done for this PR label Oct 14, 2024
DIRACGridBot pushed a commit to DIRACGridBot/DIRAC that referenced this pull request Oct 14, 2024
@DIRACGridBot
Copy link

Sweep summary

Sweep ran in https://github.com/DIRACGrid/DIRAC/actions/runs/11324634755

Successful:

  • integration

@chrisburr chrisburr deleted the perf-getTransformationFiles branch October 17, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alsoTargeting:integration Cherry pick this PR to integration after merge sweep:done All sweeping actions have been done for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants