memcount.sh
Andrew Smith | 3 August, 2008 | 21:40
I finally got around to adding that script I promised at the last meeting. dev/memcount.sh takes firefox’s pid as a parameter and prints its memory usage every second. I expanded it from the 1 line bash loop to be a little more usable.
Then I decided to run it after loading the explorer demo. Man, that thing eats memory for breakfast. So do all the teapot benchmarks (the more teapots the more memory eaten per second). Will be looking into that now.
Edit:
It’s 4MB per model per second. The lines at fault are the 3 createBuffer() calls in Model::render(). I’ll try to move them out of the render function (hopefully they’re not needed every time.
Of course it’s not as easy as it sounds - I ran into some trouble with javascript’s variables’ scope. Apparently the this keyword doesn’t mean what I thought it did, so this problem wll take some fiddling with.
