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

Speed improvements for searching by avoiding solr queries #5963

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

cjcolvar
Copy link
Member

Included in this PR:

  • Reuse existing ability model for testing if conditional facets should load because instantiating new ability objects requires a solr query to answer the ability check instead of using a cached value.
  • Use SpeedyAF::Base.for to cast the SolrDocument into a proxy when constructing a search result's title link instead of using #find which calls out to solr.

With these changes searches with 10 results per page return in about 1s vs. 3s and 4s vs. 20s with 100 results per page.

Copy link
Contributor

@masaball masaball 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 to me

@cjcolvar cjcolvar merged commit af5b08a into develop Jul 30, 2024
2 checks passed
@cjcolvar cjcolvar deleted the speed_racer branch July 30, 2024 20:01
@joncameron
Copy link
Contributor

10 results per page return in about 1s vs. 3s and 4s vs. 20s with 100 results

Nice!

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