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

optimizely / nuclear-js / 318
98%

Build:
DEFAULT BRANCH: master
Ran 27 Sep 2016 09:36PM UTC
Jobs 1
Files 14
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

pending completion
318

Pull #223

travis-ci

web-flow
Refactor getter caching based on keypath state

The current version of NuclearJS uses a cache key consisting of store
states (monotomically incresing ID per store).  This has the
disadvantage of allowing only a single level of depth when figuring out
if a cache entry is stale.  This leads to poor performance when the
shape of a Reactor's state is more deep than wide, ie a store having
multiple responsibilities for state tracking.

The implementation is as follows:

- Consumer can set the maxCacheDepth when instantiating a reactor
- Getters are broken down into the canonical set of keypaths based on
the maxCacheDepth
- Add a keypath tracker abstraction to maintain the state value of all
tracked keypaths
- After any state change (`Reactor.__notify`) dirty keypaths are
resolved and then based on which keypaths have changed any dependent
observers are called
Pull Request #223: Refactor getter caching based on keypath state

180 of 180 new or added lines in 6 files covered. (100.0%)

752 of 771 relevant lines covered (97.54%)

89.65 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/reactor/cache.js
1
100.0
src/reactor/keypath-tracker.js
3
100.0
src/getter.js

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/reactor/fns.js
1
100.0
src/reactor/cache.js
2
100.0
src/reactor.js
5
100.0
src/getter.js
Jobs
ID Job ID Ran Files Coverage
1 318.1 27 Sep 2016 09:36PM UTC 0
97.54
Travis Job 318.1
Source Files on build 318
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #318
  • Pull Request #223
  • PR Base - master (#317)
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

© 2026 Coveralls, Inc