github Reactive-Extensions/RxJS v2.5.2
RxJS version 2.5

latest releases: v4.1.0, v4.0.8, v4.0.7...
9 years ago

This is the first stable release of RxJS version 2.5. Once again with version 2.4, we've focused on performance, modularity among other topics.

To that end, here is what is included in the latest release.

  • Moving node.js Specific Bindings
  • Improved Performance of Creation Operators
  • Addition of More Rx-Lite NPM Modules

Moving node.js Specific Bindings

In previous versions, index.js included node.js specific bindings to such things as the EventEmitter, Streams, and more. This added extra bloat to RxJS, especially for those using browserify to create their appplications when many of these functions were not needed. This also caused issues for users of React and React Native. The functionality that was previously in index.js has been moved to a node.js specific NPM module called rx-node.

For those wishing to still have Rx.Node still in your application can simply do the following:

var Rx = require('rx');
Rx.Node = require('rx-node');

Existing methods that were added to Rx.Observable have been moved directly into RxJS itself such as Rx.Observable.prototype.pipe which handles node.js style streams and interoperates with such libraries such as Highland.js.

Improved Performance Of Creation Operators

In previous releases of RxJS, we focused on improving the performance of the most common used instance operators such as map, filter, mergeAll, concatAll, and various creation operators such as fromArray, from, of, range among others. In this release, we focused on some of the more basic operators such as just, throw, empty, never, and pairs.

Some of the performance gains are immense. This numbers come from node.js v0.12.2 running on a MacBook Pro with 16GB RAM.

Operator just/return

$ node just.js
old x 330,062 ops/sec ±2.25% (86 runs sampled)
new x 747,616 ops/sec ±1.60% (90 runs sampled)
Fastest is new

Operator throw/throwError

$ node throw.js
old x 336,647 ops/sec ±2.37% (85 runs sampled)
new x 867,807 ops/sec ±2.18% (76 runs sampled)
Fastest is new

Operator empty

$ node empty.js
old x 312,889 ops/sec ±2.47% (80 runs sampled)
new x 844,512 ops/sec ±1.72% (91 runs sampled)
Fastest is new

Operator never

$ node never.js
old x 350,545 ops/sec ±2.49% (81 runs sampled)
new x 1,307,236 ops/sec ±1.65% (62 runs sampled)
Fastest is new

Operator pairs

$ node pairs.js
old x 125,360 ops/sec ±1.36% (90 runs sampled)
new x 178,085 ops/sec ±1.08% (95 runs sampled)
Fastest is new

We're not even close to finishing performance optimization as we're looking at zip, combineLatest, withLatestFrom, as well as more aggregate operations such as scan in the upcoming releases.

Addition of Rx-Lite Modules

In the previous release, we released a smaller version of RxJS with the rx-lite, rx-lite-compat and its extras of rx-lite-extras and rx-lite-extras-compat which allowed you to use only rx.lite.js and rx.lite.extras.js and its older browser compatible versions. To that end, we also added the capability to add in every other module into rx-lite so that you can pick and choose to bring in certain functionality instead of getting all of the rx module. This is due mostly that people are using NPM to create their client-side applications so keeping the footprint of RxJS low is ideal.

These include:

Don't miss a new RxJS release

NewReleases is sending notifications on new releases.