8000 Performance improvement · Issue #30 · goatslacker/iso · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Performance improvement  #30
Open
Open
@deser

Description

@deser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0