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

Cache file fetch/reads in memory in WASM prover #24

Open
nalinbhardwaj opened this issue May 18, 2023 · 0 comments
Open

Cache file fetch/reads in memory in WASM prover #24

nalinbhardwaj opened this issue May 18, 2023 · 0 comments

Comments

@nalinbhardwaj
Copy link
Owner

nalinbhardwaj commented May 18, 2023

Since most webpages read these files for many steps, there's probably some mileage we can get on performance by caching these (or the internal/derived Rust structures) well. Not sure if the tradeoff will always make sense but probably worth investigating.

// TODO: can these reads be cached?
export async function read_file_async(path) {
const response = await fetch(path);
const bytes = await response.arrayBuffer();
const res = new Uint8Array(bytes);
return res;
}

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