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

pulibrary / bibdata / 937d4832-cb23-4a15-bdcf-19c9fd06c4f4

10 Jun 2025 09:33PM UTC coverage: 91.642% (-0.04%) from 91.686%
937d4832-cb23-4a15-bdcf-19c9fd06c4f4

Pull #2774

circleci

sandbergja
Migrate genre calculation to Rust

Pass data in marcbreaker format, since the marc gem's
REXML-based xml serialization was a bottleneck.
On my mac, converting a Ruby Marc object to an xml
string could only perform about 400 iterations per
second.  This MarcBreaker performs about 6000
iterations per second, reducing the bottleneck of
passing marc records to Rust as strings.

On my laptop, this increases the speed of indexing
from 245 records/second to 253 records/second.
Pull Request #2774: Migrate genre calculation to Rust

37 of 37 new or added lines in 2 files covered. (100.0%)

3 existing lines in 1 file now uncovered.

3465 of 3781 relevant lines covered (91.64%)

756.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/bibdata_rs.rb
1
# This file is responsible for requiring the compiled rust binary
2
# If it notices that there is not yet a compiled binary, it will attempt to compile it for you
3

UNCOV
4
unless Dir.glob("#{File.dirname(__FILE__)}/bibdata_rs/bibdata_rs.*").any?
×
5
  Rails.application.load_tasks
×
6
  Rake::Task['compile'].invoke
×
UNCOV
7
end
×
8

UNCOV
9
require_relative 'bibdata_rs/bibdata_rs'
×
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