0

When built and ran in release mode, my app runs at 30FPS. When built and ran in debug mode it runs at 5FPS and takes about 20sec to start up.

Will the huge slowdown of debug mode (which is required by the QML profiler) hide/mask any actual bottlenecks that I see in release mode? Note that I almost exclusively run my app in release mode, because otherwise it's too slow.

Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
  • Naive logic would suggest that a bottleneck during release runtime will be 6x smaller than it would be in debug mode, but still a bottleneck. Naturally, it is in reality not so simple and it depends, but it will at least provide **some** indication. And yeah, profiling a debug release is foolish on its face :) – dtech Oct 03 '16 at 13:26
  • @ddriver: The problem with naive logic is exactly that. Optimization doesn't make everything Nx faster. It only speeds up the bottom of the call stack, and only if that's not in library code. Anything it does higher up the stack has negligible benefit, and most bottlenecks are things the optimizer cannot fix; it can only make them harder to find. – Mike Dunlavey Oct 03 '16 at 13:36
  • BTW, the problem that QML addresses, I've addressed for the last 3 decades using [*differential execution*](https://www.youtube.com/channel/UCGwyNGICQ4RHmcYcQIG9gxw). – Mike Dunlavey Oct 03 '16 at 13:42
  • As the framerate comes to a slideshow it does literally visualize bottlenecks for you :D – dtech Oct 03 '16 at 14:35

1 Answers1

0

In my experience, there are 1) fixes you can do that the compiler's optimizer cannot, and 2) fixes the optimizer can do that you cannot.

The former (such as excess calls to new, functions in need of memoizing, system calls that do I/O you don't need, etc. etc.) are not made any more evident by profiling optimized code. In fact the optimizer makes them harder to find.

What I would do in your case is try to find out why the debug-mode code is so slow. For this purpose, I don't use a profiler. Instead I use this technique. It's a lousy measuring method. It's a great way to find speedups.

Then when you go to release mode, you may find it doing better than 30 FPS.

Community
  • 1
  • 1
Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135