iso icon indicating copy to clipboard operation
iso copied to clipboard

Performance improvement

Open deser opened this issue 8 years ago • 0 comments

Hi Guys! In this place I see no reason to encode all string:

core.encode(JSON.stringify(_state));

You can do something like this:

JSON.stringify(_state, (k, v) => typeof v  === "string" ? core.encode(v) : v);

In this case you will significantly reduce size of encoded JSON.

The same matches for decode.

deser avatar Apr 08 '16 10:04 deser