Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » I ask for advice if you like. Collapse All
Subject Author Date
tera tera Oct 15, 2008 - 1:18 AM

Hello.


The environment is 6.0 vc++.

When one DLL has 1700 source codes.


Build is slow. ( The compiler uses pch. )


debug start takes time.

Please teach a good solution.

Technical Support Oct 15, 2008 - 12:46 PM

We have some small set of sample projects provided with Prof-UIS. Some of them are very simple and some of them are a bit more complex. The compilation very depends on the template class usage. You can make your project compiling faster than the speed of light if you make all the *.H header files containing only class declarations and not including any other *.H header files if possible. This means the following: if you have some CMyClass1 class and it has the CMyClass2 m_someObj; property, then you should change it to CMyClass2 * m_ptrSomeObj; property, remove the #include "MyClass.h" line from the header file, add the class CMyClass2; line and add the #include "MyClass.h" line to the beginning of the .CPP file which contains implementation of the CMyClass2 class. As result, all the header files will include only those header files which are defining base classes. This is very complex work. It’s more complex than it sounds. If you will replace the CMyClass2 m_someObj; class property with the CMyClass2 * m_ptrSomeObj; property, then you will also need to add instantiation code which uses the new C++ operator and deletion code which uses the delete C++ operator and NULL pointer analysis. If you will convert your project according the rules described above, then it will compile as fast as just generated Win32 application even without MFC usage using standard Visual Studio wizard. The debug session startup time is also very linked to template class usage because template based class types are making debug information huge due to long class name strings. So, fastest compilation also needs all the parameters of any methods and functions to be simple class or built-in types. But the class types can have complex template based parent class types. The important thing is that any parameter of any method or function should be simple class type or built-in type like int. As you may be caught at the end of this explanation, it’s easier to buy a new computer than change the source code of your project(s) according to the rules described above. The ideas described above are also explain why old-time coded C++ projects are typically compiling faster than the C++ projects which created, for instance, last year.