2

I am using Qt Creator 3.1.1 with Qt 5.3 on Win 7. If have set up 2 kits, VC2013 and MinGW 4.8.1.

My application can be compiled, and works with both compilers. But when I start in MinGW/gdb debug mode, starting the application takes extremely long.

I can see time is spent for two things.

  1. Whenever I start debug in Qt creator checks each sub project with mingw32-make[2] , taking quit some time. Can I avoid this, as it takes quit long. Nothing changed, no need to re-check.
  2. When the make steps eventually completes, application starts but loading the libraries as shown below is slow. Why is that, it is so much slower than VC2013.

Loading libraries

Any chance how I can improve performance ...?

1
  • See this other post: stackoverflow.com/questions/18759410/…. The second part of your question (about slow loading of libraries) is a duplicate of that one. There are suggestions that work there. Commented Aug 31, 2016 at 15:41

2 Answers 2

1

The way that Qt Creator "checks" whether nothing has changed is by invoking make. Creator has no idea what other processes did to the source files, it doesn't assume any sort of exclusive ownership of the source files. Running make is the only way to be sure.

If you'd use cmake with ninja generator instead, you'll get much better performance, even on Windows. ninja is very fast compared to recursive make.

You can also run and debug without deployment - this will skip the build step. You may even add a keyboard shortcut for that :)

Sign up to request clarification or add additional context in comments.

3 Comments

Useful hints, let me check them out. Thanks so far.
For me, the slowest part is that mentioned in no.2: loading DLLs. It can take several minutes on a fast developer machine with a project of 500kB source code. Any hints for that?
@transistor That's what you get with the piss-poor gdb under Windows, I'm afraid :(
1

We have the same problem with Qt5/MinGW under Windows. Under Linux, the debugger starts the program in a few seconds, but takes minutes under windows (with the same application to debug)

As mentioned here, there may be issues with loading plugins etc. However, probably not everybody want's to dive into debugging their toolchain, I have a hint as a quick workaround:

Don't start debugging by hitting F5/Start debug, but run the program normal with Ctrl+R/Run. The program should come up quickly now. After startup, start debugging by attaching the debugger to a running application (from the debugger menu). I created a shortcut Ctrl-D for that, so it's even quicker to invoke.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.