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

memory running out #10

Open
spearmootz opened this issue May 17, 2023 · 3 comments
Open

memory running out #10

spearmootz opened this issue May 17, 2023 · 3 comments

Comments

@spearmootz
Copy link
Contributor

hello,

i am running node with 4GB of memory.

when i create an excel containing around 64k records with 58 columns of uuids i run out of memory.

i tried to play with the importObject and added mem, and memory into various keys but it didnt work :( otherwise i would be making a PR

exports: {
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
  },
  env: {
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
  },
  js: {
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
  },
  go: {
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
@spearmootz spearmootz changed the title memory limit memory running out May 17, 2023
@xuri
Copy link
Owner

xuri commented May 17, 2023

Thanks for your feedback. I will investigate this problem recently.

@spearmootz
Copy link
Contributor Author

@xuri i tried a lot of things.

i also tried to do

i.instance.exports.mem.grow(65000)

and that made it a ton faster, i assume because it had less memory grow events per say. but it reaches the exact same point. now that point is way less than 4GB (which is the maximum memory any wasm program can take at this time since its 32 bit). based on my intuition and what i read, i saw that for example when you compile rust to wasm you can specify to wasm that i can take more space. i researched how to do this in go but i did not find the answer. i hope this helps :(

@spearmootz
Copy link
Contributor Author

@xuri for reference rustwasm/wasm-bindgen#2498 (comment)

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

2 participants