User forums > General (but related to Code::Blocks)
As build log gets longer compilation gets slower (addressed in SVN 9852)
headkase:
And here is some sample output for what is generating the warnings. None of the compilation fails (errors) just lots of warnings and the output works fine:
--- Code: ---E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/dynarray.h:877:5: note: in expansion of macro 'WX_DEFINE_TYPEARRAY_WITH_DECL_PTR'
WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayDouble, wxARRAY_EMPTY expmode)
^
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/dynarray.h:995:1: note: in expansion of macro 'WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE'
WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_BASE);
^
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/dynarray.h: In member function 'void wxArrayLong::Remove(_wxArraywxArrayLong)':
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/debug.h:194:43: warning: typedef 'wxDummyCheckInt' locally defined but not used [-Wunused-local-typedefs]
#define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
^
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/debug.h:224:9: note: in expansion of macro 'wxFORCE_SEMICOLON'
wxFORCE_SEMICOLON /* just to force a semicolon */
^
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/dynarray.h:353:7: note: in expansion of macro 'wxCHECK2_MSG'
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
^
E:\Data\MinGW\CB\wxMSW-2.8.12\include/wx/dynarray.h:486:5: note: in expansion of macro '_WX_DEFINE_TYPEARRAY_HELPER'
_WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE)
^
--- End code ---
Alpha:
Thanks for detailed testing. My guess is that the largest remaining slowdown is that C::B matches every line of output against multiple regexes. To improve that, we probably would have to try integrating a faster implementation (if one exists). The library re2 claims to do that, but I have not tested. However, I am not sure if it is worth the effort to integrate. A compiler spitting out thousands of warnings generally means you have bigger problems...
I recall reading somewhere that piped processes in wxWidgets are slow to handle large volumes of text, so that might also be related.
By the way, when using wx28 (they fixed it in wx30, but apparently did not backport) with gcc4.8+, I usually add -Wno-unused-local-typedefs to global options, so that other warnings are not drowned out. Possibly including wx headers with the -isystem flag would help as well (untested).
headkase:
Thank you for looking into it so far. :)
Almost every single warning is a "note" about the expansion of a macro. Whenever anything seems to reference Wx that is what gets spit out. That is the majority. When I'm compiling my own, albeit very simple, programs no warnings occur. I could recompile Wx itself, if that is what you mean, with which flags? (The CXXFLAGS = part).
Getting 11000+ warnings I would assume wouldn't happen in normal usage, now although it has been seen to affect compile times as each warning eventually consumes around a second of real time just to display. That is an edge case and is only up to you to decide if it is worth pursuing. Thanks again though, if you'd like me to do anything else then just ask - I'm up for it! ;)
ollydbg:
--- Quote from: Alpha on July 25, 2014, 02:06:21 am ---Thanks for detailed testing. My guess is that the largest remaining slowdown is that C::B matches every line of output against multiple regexes. To improve that, we probably would have to try integrating a faster implementation (if one exists). The library re2 claims to do that, but I have not tested. However, I am not sure if it is worth the effort to integrate. ....
--- End quote ---
Maybe off topic, I once tried a similar package re2c, which need to first write a grammar file, and generate a C source file. I use it for a lexer, it runs much faster then flex. BTW: Quex is also fast.
headkase:
Please take this topic wherever it needs to go! ;)
Just to fill out what I did, I followed the: Wiki to compile Code::Blocks from source. I deviated from that while compiling WxWidgets: I had to add "-fpermissive" to the CXXFLAGS for GCC 4.9.1 to not bork on it. Boost I did the bootstrap and b2 separately than what the Wiki describes. I'm not using WxWidgets myself and the only time those warnings appear is when compiling Code::Blocks itself or the Contrib Workspace. This self compiled version, as I have said, works fine to the best I understand it. It successfully compiles itself again so all those warnings do not seem to be impeding its functionality.
The "notes" for macro expansions might be intrinsic to GCC 4.9.1 itself, I'm not an expert but I think Code::Blocks would have failed spectacularly by now if the warnings amounted to structural issues.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version