• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / cf3f208d-69bc-415f-8730-7808dac1ab7f / 1
95%
main: 95%

Build:
DEFAULT BRANCH: main
Ran 02 Nov 2025 02:41PM UTC
Files 223
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Nov 2025 02:34PM UTC coverage: 95.417% (+0.001%) from 95.416%
cf3f208d-69bc-415f-8730-7808dac1ab7f.1

push

circleci

web-flow
Memoize Bibdata.holding_locations in some helpers (#5308)

It can take quite some time to read and parse the holding locations from the disk cache.
This can be seen as a bottleneck on both the advanced search form and the search results
page.  Therefore, we should strive not to do this expensive process more than once per
request.

On the advanced form, where the #render_location_code helper method is called once for
every location in the solr index, memoizing Bibdata.holding_locations has a significant
performance gain.  Just running this locally, the server responds with the advanced
search form in half the time!

Microbenchmark before:
```
$ be ruby benchmarks/app/helpers/application_helper.rb
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
ApplicationHelper#render_location_code
                        87.000 i/100ms
Calculating -------------------------------------
ApplicationHelper#render_location_code
                        882.392 (± 1.6%) i/s    (1.13 ms/i) -      4.437k in   5.029587s
```

After:
```
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
ApplicationHelper#render_location_code
                       127.558k i/100ms
Calculating -------------------------------------
ApplicationHelper#render_location_code
                          1.280M (± 1.0%) i/s  (781.40 ns/i) -      6.505M in   5.083919s
```

6205 of 6503 relevant lines covered (95.42%)

1462.93 hits per line

Source Files on job cf3f208d-69bc-415f-8730-7808dac1ab7f.1
  • Tree
  • List 223
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 0
  • 13e2c7df on github
  • Prev Job for on main (#d41b6aa3-57c1-451e-a2dd-85d8d99cf0b8.1)
  • Next Job for on main (#4a01706a-017d-4da4-b075-56931cca2646.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc