Jump to content

Memory Leaker - [resolved]


Wingnut
 Share

Recommended Posts

Hi Gang!  I rarely start posts, but I am checking on a slow browser crasher that COULD be a memory leak.

http://playground.babylonjs.com/#1AVEYO#36

I'm not really qualified to comment on performance and memory issues, but others nearby are quite good at "watching the numbers".

I think the numbers are worth watching, here.  I see memory usage continuously increasing and this crashes Firefox after about 30 minutes... on my machine.

Thanks to all investigators. 

Link to comment
Share on other sites

I think it's cause your beta after 30 mins is a huge number.  Try having the beta roll back to 0 at certain points that do not effect your animation.

thats the only thing I could see after a quick glance that would be causing ram to build up, but I'm not sure if that would be the cause.

 

yeah just looking at it on my phone I think it's your alpha and beta values I'm just on my phone but what's its alpha and betas value after 10mins?

Link to comment
Share on other sites

Thanks, guys.  I think I'm still seeing creap'n'seep on #38.  I open my Windows performance monitor, and watch the numbers on the "memory" window... on the row for Firefox.

There are 4 columns I am watching... commit, working Set, Shareable, and Private.  Shareable is holding steady, but the other 3 are slowly on their way to the moon.  :)

I better submit this before my browser puffs.  Been about 15 mins since I started #38 running.  (Wingy dons his crash helmet and fire suit.)  heh

btw, this is not my playground... just one I had bookmarked cuz I loved it so much.  I recently put colors on it.  Purrrrdy.  I am collecting a huge pile of great playgrounds (URLs) so I can add them to Temechon's "Cool Playgrounds" doc... eventually.  Probably need two categories.  Best-Code Playgrounds, and Prettiest Playgrounds.

#38 is still holding well.  After GC (or something), it pulls its numbers back into shape rather nicely.  Maybe our investigators have been successful!  YAY!

Link to comment
Share on other sites

 I'm letting 39 run for a few minutes here and have run the chrome dev tools timeline a few times.  The highest I've seen the memory go is 63MB.  The graph of the timeline goes up and down, but never goes above 63MB.

When I run 36, the graph is clearly going up.  Memory is at 74MB in the first 40 seconds, 119MB after the first minute and it continues rising.

I'll let 39 run for a good 30 minutes and see if it is still steady.

 

Link to comment
Share on other sites

On 9/12/2016 at 2:44 PM, adam said:

Edit: this probably isn't a good fix, because I'm think makeGeometryUnique is used when cloning a mesh.  It wouldn't make sense to trash the original geometry.

I see that releaseForMesh checks the number of meshes before disposing.  Nice.

https://github.com/BabylonJS/Babylon.js/blob/d116cde676ba5e74dfbf25c1349d981a9b94c713/src/Mesh/babylon.geometry.js#L263

Next time I'll just submit a PR so that I can get some github cred. :)

Link to comment
Share on other sites

On 9/12/2016 at 1:44 PM, adam said:

this probably isn't a good fix

It was that comment that made me... umm...

   ...let's just say... the more, the merrier.  :D

An official invitation to Deltakosh... to join us at this campfire conversation... is... you know... proper diplomatic protocol.  heh

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...