Hi there Guest,  
Sign in here: Login through Steam



  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Memory leak with skins

#1
Everytime I pull out my forgotten SG i lose a decent amount of frames.

If the skin isn't applied yet, my FPS will not go down, however, if the skin is visible on my gun, my fps goes down by around 50%~.

Here are some screenshots I took proving it has to do with the skin:

Without the SG equipped:

Image

With the SG equipped:

Image

Without the SG equipped:

Image

With the SG equipped:

Image
Reply

#2
That's not a memory leak. Memory leak is something that builds up overtime, and fails to free memory. Eventually causing a lot of issues. Lua has garbage collection so memory leaks are only a possible issue in a few places.

If this caused you to drop below a playable framerate it would be worth noting, however, the more base FPS you have, the more frames will drop when something has a longer render time.

The amount of frames lost is not linear, meaning, it will not be the same across all framerates. So, If you were at 70 fps and use the skin you will not drop to 10fps because you lose that many frames at ~240fps. Why is this? Well.. Math.

240fps = 240 frames drawn per second, that means it takes each frame approximately 0.00416666666666666666666666666667 seconds to render. What happens if you increase this ever so slighty. Add 0.001 to the render time? Well now you drop to 193 fps. Thats a HUGE fps drop for a VERY MINIMAL performance hit. 60FPS means each frame takes around 0.01666666666666666666666666666667. Add 0.001 to that time and what do you get? 56 fps.

The fact that it's been out for years and the performance impact has only just now been noticed further proves my point.

Here's some quick screenshots of my FPS loss, give or take a few FPS due to it changing constantly. I never have as high of FPS as you do due to my machine being more outdated it seems, so I don't lose near as much:
It's important to note, anything done in the rendering process in realtime will have a performance impact. That doesn't mean it's bad or a leak or anything.

Skins have to: Apply custom skin before each weapon render, then reset the material override after it's drawn (so everything else doesn't have the skin).
Find
Reply

#3
my god brass you know your stuff... its kinda scary...
Mary has entered the Server.
G01dmaster: NO!
G01dmaster has left the Server.
Find
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)