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 CnaEvent lookup and storage in CnaUtil #1

Conversation

sgicbpc
Copy link
Contributor

@sgicbpc sgicbpc commented Dec 5, 2023

This commit improves the performance of the storeCnaEvents method by replacing the stream-based lookup with a HashSet contains check. This change reduces the computational complexity from O(n) to O(1) for the lookup operation, resulting in a significant performance gain when processing large collections of CnaEvent objects.

Note: This PR is carried over from cBioPortal/cbioportal#10478

Requesting review and merge from @JREastonMarks . Thank you!

This commit improves the performance of the storeCnaEvents method by
replacing the stream-based lookup with a HashSet contains check. This
change reduces the computational complexity from O(n) to O(1) for the
lookup operation, resulting in a significant performance gain when
processing large collections of CnaEvent objects.
@sgicbpc sgicbpc force-pushed the cna_util_store_cna_events_performance_improvement branch from a2e02d1 to 9ce5721 Compare December 5, 2023 06:48
@JREastonMarks
Copy link
Contributor

Hi,
We haven't forgotten about this PR either. I plan on merging it in after the 6.0.0 release which will hopefully happen soon.
~Jeremy

@JREastonMarks JREastonMarks merged commit f576a2b into cBioPortal:main Feb 13, 2024
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.

2 participants