SFML community forums
Help => Graphics => Topic started by: slotdev on May 15, 2011, 10:45:26 pm
-
Hi
I've just started implementing SFML and so far, VERY IMPRESSED!
I'm loading 5x 2048x2048 PNG images, then creating sprites from them. It works just fine, but loading the actual files is very slow (~12 seconds for all 5). On the "other" library I used to use, this was very fast, maybe 3 seconds total for all 5 files. The files are between 650k and 3.3mb (some are almost empty files).
I guess it's not the actual loading, but the decompression into memory that takes the time?
Can someone help?
Many Thanks
Ed
-
Can you upload these images so that I can test them and see which part is slow?
-
Sure - can I email them to you, as they're for work and shouldn't be public :D
-
Sure, no problem.
-
Ah sorry - I uploaded them to my dropbox and PM'd you the link
Thanks
Ed
-
Update: I had to recompile the SFML libs to minimize CRT dependancies, and after doing so, then recompiling my game, the delay has gone!
It now takes ~3 seconds to load all 5 PNGs, which is about right, I think.
So I guess there might be something strange in the libraries and maybe it's doing some crazy loading/unloading of DLLs for every image. No idea. But for now, it works for me :)
-
That's really strange :shock:
-
Could be there are still some debug code in there? I know that for me to load my .obj model in debug takes like a million years while in release there is no loading time at all, I mean absolutely none! (I think there's somewhere around 10 000 faces in that model)
-
Hmm!
There is something strange - in Release mode, it's very fast, in Debug, it's very slow. I am confused :S
-
There is something strange - in Release mode, it's very fast, in Debug, it's very slow. I am confused :S
This is not strange at all, debug mode is always slower because the compiler doesn't optimize at all.
-
I wouldn't think it was 5x slower due to having the optimization disable, but I'll check my project settings - thanks :)
-
It is not only the optimizations that are turned off. Debug informations and additional runtime checks lead to further overhead.