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

brick / money
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: Historical-currencies
DEFAULT BRANCH: master
Repo Added 04 Jun 2015 10:38AM UTC
Files 26
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

LAST BUILD ON BRANCH 0.4.2
branch: 0.4.2
CHANGE BRANCH
x
Reset
  • 0.4.2
  • 0.1.0
  • 0.1.1
  • 0.10.0
  • 0.10.1
  • 0.10.2
  • 0.10.3
  • 0.2.0
  • 0.2.1
  • 0.2.2
  • 0.2.3
  • 0.2.4
  • 0.3.0
  • 0.3.1
  • 0.3.2
  • 0.3.3
  • 0.3.4
  • 0.4.0
  • 0.4.1
  • 0.4.3
  • 0.4.4
  • 0.4.5
  • 0.5.0
  • 0.5.3
  • 0.6.0
  • 0.7.0
  • 0.7.1
  • 0.8.0
  • 0.8.1
  • 0.9.0
  • Historical-currencies
  • MoneyFactory
  • adjustment
  • ci
  • context
  • defaultmoney
  • ecs
  • embedded-context
  • feat/money-formatter
  • feat/money-formatter2
  • fix_allocate
  • master
  • patch-1
  • php74
  • php80
  • php81
  • php84
  • previous-exception
  • rational
  • step
  • v0.1

pending completion
309

push

travis-ci

BenMorel
Cache Money::formatTo()'s NumberFormatter for improved performance

Calling formatTo() many times spends quite some time in NumberFormatter constructor, that performs I/O, according to the profiler.
Because we usually call formatTo() many times in a row for the same locale, we can get a ~2x speedup with this fix.

The best way to tackle this in the future would be to deprecate the formatTo() method and introduce a MoneyFormatter object, that would keep a local cache of all locale/scale pairs.

427 of 427 relevant lines covered (100.0%)

125.91 hits per line

Relevant lines Covered
Build:
Build:
427 RELEVANT LINES 427 COVERED LINES
125.91 HITS PER LINE
Source Files on 0.4.2
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
309 0.4.2 Cache Money::formatTo()'s NumberFormatter for improved performance Calling formatTo() many times spends quite some time in NumberFormatter constructor, that performs I/O, according to the profiler. Because we usually call formatTo() many times in... push 04 Jul 2019 03:13PM UTC BenMorel travis-ci pending completion  
See All Builds (518)
  • Repo on GitHub
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