Skip to content

Perf: Batch load SKOS root classes#309

Merged
mdorf merged 1 commit into
developfrom
perf/batch-skos-root-loading
Jul 20, 2026
Merged

Perf: Batch load SKOS root classes#309
mdorf merged 1 commit into
developfrom
perf/batch-skos-root-loading

Conversation

@mdorf

@mdorf mdorf commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace per-root Class.find hydration with one ID-constrained batch load.
  • Load the required root attributes in the same query.
  • Preserve SKOS predicate fallback, empty results, pagination, and ordering.
  • Advance Goo to the revision containing #191.

Fixes #306.

Performance

Measured through a local API process against the staging AllegroGraph data using AGROVOC /classes/roots?include=prefLabel (25 roots).

Five warmups were followed by 50 alternating measured requests per version.

Version Median p95 Mean
Before 454.1 ms 645.0 ms 484.5 ms
After 236.9 ms 298.7 ms 242.9 ms
Improvement 47.8% 53.7% 49.9%

A second run with 30 requests per version confirmed a 47.6% median improvement. Canonical response bodies were identical before and after.

The six-root regression fixture also reduces Goo SPARQL queries from 9 to 3.

Verification

  • SKOS submission tests: 13 runs, 169 assertions.
  • Root-class tests: 2 runs, 73 assertions.

@mdorf
mdorf marked this pull request as ready for review July 16, 2026 22:02
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.02%. Comparing base (d3796b5) to head (b67edaf).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #309      +/-   ##
===========================================
+ Coverage    81.85%   82.02%   +0.17%     
===========================================
  Files          101      101              
  Lines         6849     6853       +4     
===========================================
+ Hits          5606     5621      +15     
+ Misses        1243     1232      -11     
Flag Coverage Δ
ag 81.94% <100.00%> (+0.17%) ⬆️
fs 82.00% <100.00%> (+0.18%) ⬆️
gd 81.96% <100.00%> (+0.20%) ⬆️
unittests 82.02% <100.00%> (+0.17%) ⬆️
vo 81.92% <100.00%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mdorf
mdorf merged commit 6409971 into develop Jul 20, 2026
12 checks passed
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.

1 participant