-
Notifications
You must be signed in to change notification settings - Fork 237
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
How to get this to work nowadays? #12
Comments
I've been messing around with it, but I'm getting all kinds of memory leaks i think... |
Interesting code, did you try profiling the memory using Google Chrome to find what and where it leaks? |
I tried it, but I couldn't find out where the leaks are. I've never done that before and its very hard to figure out. |
What's your development setup to run that code? |
I'm using meteor there. But meteor is entirely unnecessary here. I copied it all to a just an html document and its still a problem for me. |
I'll upload it so you can see it |
Here it is with just static files (no dev environment). Thanks for the help. I'm really interested in how you inspect this. Its frustrating how there are no console errors... |
I was able to get it stable as far as of memory usage goes, it would stick to a certain amount of RAM and then would go up 100kb to 300kb but then the garbage collection would kill some of those bytes returning to the old amount. The only problem that I found is that sometimes onaudioprocess stops working, reloading the page a few times fixes it. What I did was to dump the temporary canvas: HERE: AND HERE: AND HERE REPLACED WITH THE DEFAULT CANVAS: |
I also made the pause function to freeze the drawing: if (!paused) |
Interesting finding, on Firefox it never freezes but the memory usage is huge and keeps growing. |
yeah. I can't seem to figure out what is going on. I just quit and used audio context analyser node instead. but it definitely doesnt have a lot of the conveniences that they have here.... |
The leak seems to be on the canvas drawing portion (requestAnimationFrame), at least on Chrome that's what I confirmed and after the changes above I got to a stable ram usage, I think it was around 27MB. On Firefox I didn't have a change to find what leaks yet. |
I'm getting many kinds of javascript errors on Chrome and Firefox, does anyone know how to get it compatible with today's browser?
Thanks
The text was updated successfully, but these errors were encountered: