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

brick / money / 308 / 4
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 04 Jul 2019 03:10PM UTC
Files 25
Run time 3s
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

04 Jul 2019 03:08PM UTC coverage: 100.0%. Remained the same
dependencies=lowest

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%)

31.51 hits per line

Source Files on job 308.4 (dependencies=lowest)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 299
  • Travis Job 308.4
  • 259f9f56 on github
  • Prev Job for dependencies=lowest on master (#307.4)
  • Next Job for dependencies=lowest on master (#310.5)
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