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

pulibrary / allsearch_api / 56b63174-bf77-478c-84c7-586e1bdd8bc3 / 1
100%
main: 100%

Build:
Build:
LAST BUILD BRANCH: remove_rails_references
DEFAULT BRANCH: main
Ran 13 Dec 2025 04:57AM UTC
Files 85
Run time 2s
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

13 Dec 2025 04:56AM UTC coverage: 100.0%. Remained the same
56b63174-bf77-478c-84c7-586e1bdd8bc3.1

Pull #496

circleci

sandbergja
Skip nokogiri-based sanitization for strings that don't contain angle brackets

It can be expensive to run the full sanitization routine on long
strings, so let's skip it if they don't need HTML-parser based sanitization,
using the heuristic of checking for an opening angle bracket.

Also, use ruby's squeeze method to avoid an expensive regular expression.

According to the attached microbenchmark:

before:
```
Warming up --------------------------------------
           sanitizer   583.000 i/100ms
Calculating -------------------------------------
           sanitizer      6.308k (± 4.5%) i/s  (158.54 μs/i) -     31.482k in   5.001876s
```

after:
```
Warming up --------------------------------------
           sanitizer    25.400k i/100ms
Calculating -------------------------------------
           sanitizer    257.972k (± 3.5%) i/s    (3.88 μs/i) -      1.295M in   5.028767s
```
Pull Request #496: Skip nokogiri-based sanitization for strings that don't contain angle brackets

1430 of 1430 relevant lines covered (100.0%)

76.48 hits per line

Source Files on job 56b63174-bf77-478c-84c7-586e1bdd8bc3.1
  • Tree
  • List 85
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 56
  • 47177f09 on github
  • Prev Job for on faster-sanitize (#8bf072d0-9d0c-40e9-80ab-7d8a11e53fd5.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

© 2025 Coveralls, Inc