Skip to content

Using less memory #22

Description

@greggman

Just throwing out ideas. Ideally we'd like to be able to capture from a page that uses lots of resources (think 2gigs of textures). Right now, if I understand correctly, all of that will be downloaded to Uint8Arrays and the converted to native JS arrays.

Maybe instead we could write each Uint8Array to a blob and then concat the blobs into a file. This would mean we don't need an entire copy of the contents of the resources in memory while capturing.

Similarly, on loading a replay, if we know the offsets and sizes from the file we can load them individually, upload the the GPU so we don't need all the data in memory as we're reloading it.

maybe all of this is obvious and we certainly shouldn't do it until we need to but I suspect we'll need to pretty quickly as the browser is going to run out of memory with giant JSON files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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