Skip to content

Commit

Permalink
[DO NOT MERGE]: Rehydrate time trial results.
Browse files Browse the repository at this point in the history
This commit fails tests because it intentionally uses
`remotedev-serialize` without our escaping wrapper, to collect
performance data about the wrapper.

See the parent commit for info on this experiment. Here's the data:

On 9e78659 (current upstream/master; this branch is rebased on that
commit):

850
844
856
843
843
841
840
839
850
844

On the parent commit, `remotedev-serialize` WITH our escaping
wrapper:

1038
965
951
960
960
965
966
962
962
953

At this commit, `remotedev-serialize` WITHOUT our escaping wrapper:

913
902
883
888
874
971
892
896
878
890

Any increase in rehydrate time from the status quo to our use of
`remotedev-serialize` is expected and hard to avoid.

I would guess that we're seeing a statistically significant increase
in rehydrate time associated with our escaping wrapper, as opposed
to just using `remotedev-serialize` without the wrapper. If the
delay is long enough, maybe we'd like to look at a more efficient
implementation of the wrapper.
  • Loading branch information
Chris Bobbe committed Apr 29, 2020
1 parent 6b601bc commit 89c5d96
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/boot/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { applyMiddleware, compose, createStore } from 'redux';
import type { Store } from 'redux';
import Immutable from 'immutable';
import * as Serialize from 'remotedev-serialize';
import { persistStore, autoRehydrate } from '../third/redux-persist';
import type { Config } from '../third/redux-persist';

Expand Down Expand Up @@ -184,12 +185,7 @@ const customReviver = (key, value, defaultReviver) => {
return defaultReviver(key, value);
};

const { stringify, parse } = SerializeEscaped.immutable(
Immutable,
null,
customReplacer,
customReviver,
);
const { stringify, parse } = Serialize.immutable(Immutable, null, customReplacer, customReviver);

const reduxPersistConfig: Config = {
whitelist: [...storeKeys, ...cacheKeys],
Expand Down

0 comments on commit 89c5d96

Please sign in to comment.