Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using less memory #22

Open
greggman opened this issue Dec 30, 2022 · 0 comments
Open

Using less memory #22

greggman opened this issue Dec 30, 2022 · 0 comments

Comments

@greggman
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant