mattkrick / redux-optimistic-ui

a reducer enhancer to enable type-agnostic optimistic updates
MIT License
693 stars 36 forks source link

Replace ImmutableJS with native javascript methods #30

Closed marcins closed 7 years ago

marcins commented 7 years ago

This fixes #21 - replacing the use of ImmutableJS with native JavaScript, while maintaining immutability.

Note that Immutable is still a devDep, because I kept the test that had an Immutable reducer to ensure backwards compatibility in that regard.

marcins commented 7 years ago

Performance on my previous benchmark suite (see comments on #21) is slightly faster than Immutable, uses slightly less memory than Icepick, and doesn't suffer from the same weird spike half way through the run. Really though all the options are very close together.

benchmark

Hard to see from the overlapping graph but actual runtimes were:

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.03%) to 93.333% when pulling 778deef373a45da0419da8aab1e6b652a9e263b0 on marcins:immutable-to-native into 6868145934031b4bbe2530e805520624c4fea375 on mattkrick:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.03%) to 93.333% when pulling 6fa17a186b5b8f74eb75d41d6b27392fe2e245db on marcins:immutable-to-native into 6868145934031b4bbe2530e805520624c4fea375 on mattkrick:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.4%) to 93.75% when pulling 57e9872e1344c4e3ac3ac9e2492f3ace9dcdb449 on marcins:immutable-to-native into 6868145934031b4bbe2530e805520624c4fea375 on mattkrick:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.8%) to 94.118% when pulling 45e9ede28aab0face14b5659d85ec68bcfd54021 on marcins:immutable-to-native into 6868145934031b4bbe2530e805520624c4fea375 on mattkrick:master.

marcins commented 7 years ago

I need to:

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.8%) to 94.118% when pulling 6944cee47336ccacb47483e92e43e008c6cd97d2 on marcins:immutable-to-native into 91b0dea12c9d056c19ebc021f45d377f8f08ff26 on mattkrick:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+7.7%) to 100.0% when pulling e7b3e3b24443c3a1d4144de54bf68717aad270e6 on marcins:immutable-to-native into 91b0dea12c9d056c19ebc021f45d377f8f08ff26 on mattkrick:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+7.7%) to 100.0% when pulling e7b3e3b24443c3a1d4144de54bf68717aad270e6 on marcins:immutable-to-native into 91b0dea12c9d056c19ebc021f45d377f8f08ff26 on mattkrick:master.

marcins commented 7 years ago

I'm going to run some quick smoke tests in the browser on these changes before merging - want to make sure I haven't accidentally introduced something that works in the Node tests but not in a browser.