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

elixir-gettext / gettext / 180931cb6663d453f89d1d21cca16f7eb1d42bd4-PR-445
94%
main: 94%

Build:
Build:
LAST BUILD BRANCH: extraction-merge-perf
DEFAULT BRANCH: main
Ran 15 Oct 2026 03:26PM UTC
Jobs 1
Files 19
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

15 Oct 2026 03:24PM UTC coverage: 93.704% (+0.04%) from 93.665%
180931cb6663d453f89d1d21cca16f7eb1d42bd4-PR-445

Pull #445

github

oliver-kriska
Compile the interpolation patterns once per VM

to_interpolatable/1 compiled the "%{" and "}" patterns with
:binary.compile_pattern/1 on every call. Each compilation costs about as
much as splitting a short string, and this function runs on every runtime
interpolation: whenever the current locale has no translation for a
message, including every render in the default locale of an application
without a PO file for it, and once per message at compile time.

A compiled pattern is a reference, so it cannot live in a module attribute;
the two patterns are now compiled on first use and kept in persistent_term.
Passing the literal strings to :binary.split/2 instead would compile them
again on every split and gets slower as the number of bindings grows.

Microbenchmark of runtime_interpolate/2 (compiled loop, median of 7
alternating samples, Elixir 1.20.4 / OTP 29, one scheduler; OTP 27 within
5% of these):

    input                        before    after
    no bindings                  0.44 us   0.15 us
    1 binary binding             0.72 us   0.39 us
    3 binary bindings            1.06 us   0.78 us
    32 bindings                  7.76 us   7.27 us
    long text, 1 binding         0.75 us   0.45 us
Pull Request #445: Remove redundant work from extraction, backend compilation and runtime interpolation

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

759 of 810 relevant lines covered (93.7%)

38.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 180931cb6663d453f89d1d21cca16f7eb1d42bd4-PR-445.1 15 Oct 2026 03:26PM UTC 19
93.7
GitHub Action Run
Source Files on build 180931cb6663d453f89d1d21cca16f7eb1d42bd4-PR-445
  • Tree
  • List 19
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #445
  • PR Base - main (#C29C9CEE...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc