SFML community forums
Help => Window => Topic started by: slotdev on July 16, 2015, 04:08:14 pm
-
Hi Everyone
I've recently upgraded our dev environment from SFML 2.0 to 2.3, and I've noticed something. The split of system to video memory seems to have changed, though the overall usage isnt wildly different. For example, this is a game on 2.0 and 2.3 (100% same game code, only difference is SFML version):
SFML 2.0
20mb system memory
52mb video memory
SFML 2.3
35mb system memory
44mb video memory
Does anyone know why this would be, I know quite a bit has changed under the covers......
Many Thanks
-
How many memory data sets did you take and how did you obtain them?
Because if it's just one random data set for each case the difference means nothing at all.
I've no idea where more/less memory was used, but I'm curious what you gain from knowing that it has changed a few megabytes and more so what you gain from know why it changed. ;)
-
This was from around 6 samples of each. Not scientific, but not a million miles away.
We have to make games work on devices with as little as 32mb video memory and 1024x600 resolution (literally 15 year old hardware) and crappy Intel video drivers. So every megabyte counts.
We have to use every trick in the book to make the games work...
:)
-
Even if 1 data structure was changed to be 1 byte larger, we still have no idea how many instances of it you have in your code. I can tell you now that we didn't introduce any weird 10 MB caches or something, so the difference you see is either from one of the dependencies (which did change a bit) or many many instances of some smaller object that did change a bit in size. Either way, only you can know where you are using memory. It isn't exactly rocket science to understand that any data structure you instantiate costs RAM, and the more of them you have the larger of an impact any size changes will make. ;)
-
Very true, but the game code is 100% identical between versions, so only SFML changes. It's not a problem, but aside from reading thousands of lines of code, or thousands of Git comments, it's hard to know what has changed between versions. Some kind of synopsis of changes would be handy but I know its extra work for someone :)
It does seem to run faster though, so that's good, and glad to see the Intel bug finally fixed. You don't know how happy that makes us :)
-
http://www.sfml-dev.org/changelog.php