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 leak #3

Open
adri326 opened this issue Jan 23, 2022 · 1 comment
Open

Memory leak #3

adri326 opened this issue Jan 23, 2022 · 1 comment

Comments

@adri326
Copy link

adri326 commented Jan 23, 2022

After pinning down the source of the memory leak in my application, I saw that a huge portion of it came from your library, specifically perlin.js:41.

this.memory[[x,y]] = v;

I understand the motive behind it (it's much faster to retrieve this data from memory), but in my case it led to the application crashing after one hour of perlin-driven motion.

I'd recommend to add some kind of flag to disable the memory, or to stop putting anything in it once it reaches a critical size.

Also, your library has no LICENSE file, so I can't contribute to it.

@DarksideAlex
Copy link

The problem here is, that the perlin noise is being procedurally randomly generated (It is not a random seed or something, but instead it only generates the result, once you're requesting it). This is why it has to be saved to memory. And that is also why I'm not using this library anymore: It's only good for random perlin noise, but I need perlin noise to generate terrain.

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