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

pulibrary / orangelight / 2d9b4e4b-8c4a-4734-bbf2-4a9c46bdef41
95%
main: 95%

Build:
Build:
LAST BUILD BRANCH: 5301-refactor-orangelight-js
DEFAULT BRANCH: main
Ran 27 Oct 2025 02:24AM UTC
Jobs 1
Files 221
Run time 1min
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

27 Oct 2025 02:18AM UTC coverage: 95.358% (+0.002%) from 95.356%
2d9b4e4b-8c4a-4734-bbf2-4a9c46bdef41

Pull #5268

circleci

sandbergja
Improve performance of online_holding_note?

* Rename method for clarity
* Memoize the parsed JSON so that it does not need to
  be parsed again for every field in the catalog
  controller (this is the main performance gain)
* Symbolize names to reduce memory allocations
* Use any? with a block, rather than collect, so we
  don't need to iterate through every holding if we
  get a match before that
* Check in a microbenchmark
* Upgrade the json gem to a newer version that has
  some performance optimizations

Microbenchmark before:
```
$ bundle exec ruby benchmarks/app/controllers/concerns/orangelight/catalog.rb
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
                        36.000 i/100ms
Calculating -------------------------------------
                        363.356 (± 1.4%) i/s    (2.75 ms/i) -      1.836k in   5.053892s
23428 objects allocated
```

Microbenchmark after:
```
Warming up --------------------------------------
                       374.839k i/100ms
Calculating -------------------------------------
                          3.749M (± 0.7%) i/s  (266.76 ns/i) -     18.742M in   4.999956s
2 objects allocated
```

* More iterations/second is good!
* Fewer allocations is good!
Pull Request #5268: Improve performance of online_holding_note?

6 of 6 new or added lines in 3 files covered. (100.0%)

6142 of 6441 relevant lines covered (95.36%)

1501.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2d9b4e4b-8c4a-4734-bbf2-4a9c46bdef41.1 27 Oct 2025 02:24AM UTC 221
95.36
Source Files on build 2d9b4e4b-8c4a-4734-bbf2-4a9c46bdef41
  • Tree
  • List 221
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #2D9B4E4B...
  • Pull Request #5268
  • PR Base - main (#7597E26B...)
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

© 2025 Coveralls, Inc