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

7398 saved search performance #7447

Merged
merged 7 commits into from
Dec 3, 2020
Merged

Conversation

scolapasta
Copy link
Contributor

What this PR does / why we need it:
Adds some optimization for saved searches and some code cleanup

Which issue(s) this PR closes:

None for sure - it may fix #7398if the performance is improved enough

Special notes for your reviewer:
While I was at it, I made some Named queries and did some cleanup.

Suggestions on how to test this:
just make sure saved searches work as expected. You could also compare the timing of how long it takes to update a saved search before and after. (I will be doing some timing test with prod once released)

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No

Is there a release notes update needed for this change?:
No

Additional documentation:

@coveralls
Copy link

coveralls commented Dec 2, 2020

Coverage Status

Coverage increased (+0.003%) to 19.4% when pulling 13443b4 on 7398-saved-search-performance into c1efd01 on develop.

@sekmiller sekmiller self-assigned this Dec 2, 2020
@@ -60,31 +42,15 @@

public List<Dataverse> findLinkingDataverses(Long datasetId) {
List<Dataverse> retList = new ArrayList<>();
for (DatasetLinkingDataverse dld : findDatasetLinkingDataverses(datasetId)) {
retList.add(dld.getLinkingDataverse());
Query query = em.createQuery("select object(o) from DatasetLinkingDataverse as o where o.dataset.id =:datasetId order by o.id");
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this wasn't added as a named query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, just because I was only changing the ones related specifically to saved search. I did think about it. And sure, I can add the others too, while I'm at it.

Copy link
Contributor

@sekmiller sekmiller 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. passing to QA.

@kcondon kcondon self-assigned this Dec 3, 2020
@kcondon kcondon merged commit b5b96fc into develop Dec 3, 2020
@kcondon kcondon deleted the 7398-saved-search-performance branch December 3, 2020 20:49
@djbrooke djbrooke added this to the 5.3 milestone Dec 3, 2020
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.

5 participants