Serious performance drop (30FPS) moving from VS2013 to VS2015 (both Community)

16    10 Jun 2015 09:19 by u/wolvonk

I'm programming a game using C++ and OpenGL through GLFW (I'll give more info if needed). I left my code completely unchanged during the move, but went from ~58 FPS to ~25 FPS. I rebuilt some libraries with CMake and VS2015 though: entityx, truetype (also upgraded to 2.6) and GLFW. Nothing else was changed.

When profiling, the bottleneck seems to be OpenGL calls (~60%)

  1. My one guess is the problem arose when I built the libs since I'm still learning the ropes regarding that, but I haven't encountered this problem before.
  2. The only other possibilities seem to be 2.1. The Visual Studio "auto-conversion" from vs2013 to vs2015 screwed up. 2.2. VS2015 is just slower. 2.3. My middleware doesn't support VS2015 yet.

I don't want to waste too much time solving this, and would rather go back to vs2013 for the moment if it'll take a long time. Possible solutions I can think of, but want to confirm a little first:

A. I might rebuild all the libraries I use and build them with VS2015 (stuff like glm, IL, rapidJSON etc). VS2015 doesn't spit out complaints about them though. B. Does anyone think a fresh solution importing my files will do the trick?

Thanks!

SOLVED: I had linked entityx's debug version to my release version incorrectly. Silly mistake now fixed, with my FPS now more than double (157 FPS) what it was before. Thanks to /u/rwbj for helping me out.

4 comments

12

Without patronizing you, I think it's always important to start with the "Have you made sure it's plugged in?" line of stuff first. My first guess here is that you accidentally built the libraries under debug or some sort of non-release settings. It's easy to test this. Take the binaries of the libraries and plug them into your old project and see what happens. If everything's running just dandy there then you can at least isolate the problem to the new base project. And on that topic of course also check for similar optimization/release settings for the new project itself. I'm not sure if these are carried over consistently in the import process.

5

Not patronizing at all. Since I'm mostly self-taught and swimming in imposter syndrome, I expect glaring gaps. I'm just grateful for your time and will try what you suggested.

6

Got it! I mixed up my linking as you said. VS2015 kicking ass now. Also caught a long-standing performance problem and FPS is three times what it was. :) Thanks a bunch!

5

Awesome! Glad to be able to help.