Skip to content

Using ArrayBuffer to Store/Transfer Grid State #505

Description

@anthumchris

I went into a rabbit hole after reading Surma's article "Is postMessage Slow?" and became curious to know the feasibility of using an ArrayBuffer with PROXX for performant postMessage() calls. My thoughts were to provide native JS property access while maintaining behavior of interface Cell to allow usage like: grid.cells[col][row].hasMine = true.

Do you think the approach below could provide benefits or is the current patchset implementation already performant enough? Instead of cluttering this thread with code, I wrote an independent POC to test the transferability of Cell states in a 40x40 grid. Start at CellGrid and Cell in branch: master...AnthumChris:arraybuffer-poc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions