User forums > General (but related to Code::Blocks)

As build log gets longer compilation gets slower (addressed in SVN 9852)

(1/4) > >>

headkase:
Edit: SVN 9852 is now available with the change log indicating it addresses this issue. (Link).

I have successfully compiled the current SVN (9851) with This toolchain.  That is a full compile of WxWidgets 2.8.12 Unicode (needed -fpermissive in CXXFLAGS), BOOST 1.55, SVN 9851, and the complete contrib plugins (including Nassi which needed BOOST).  While getting everything figured out I compiled 9851 with 9851 a few times over so it can be assured that the output is correctly handling complex projects.  There are an excessive amount of warnings during the compile process but no actual errors and as said the output works correctly.  With the main Code::Blocks project the compilation starts fast but then begins to slow as the build log gets longer, the contrib plugins however eventually generate so many warnings that the build log grows to tens of thousands of lines and compilation slows to a crawl.  I aborted compilation after 172 minutes for contrib and it was still nowhere near done.  Disabling compiler logging and enabling the "-w" compiler flag to suppress warnings the contrib plugins successfully compile in a few minutes instead of hours and not done.  As the build log grows longer performance suffers.

Alpha:
I believe each append to the build log messages is immediately followed with an auto-resize of columns.  This is a likely performance candidate.  (Apologies, I am unable to explore further into it at the moment.)

headkase:
I'm always more than willing to pull a new SVN to test for you.. ;)

The vast majority of the warnings are related to WxWidgets.  It seems everything needs to reference that.

Alpha:
Could you test if this patch reduces the performance issues:

--- Code: ---diff --git a/src/plugins/compilergcc/compilergcc.cpp b/src/plugins/compilergcc/compilergcc.cpp
index 3e82e3b..f6744c6 100644
--- a/src/plugins/compilergcc/compilergcc.cpp
+++ b/src/plugins/compilergcc/compilergcc.cpp
@@ -3467,7 +3467,14 @@ void CompilerGCC::LogWarningOrError(CompilerLineType lt, cbProject* prj, const w
     Logger::level lv = (lt == cltError)   ? Logger::error
                      : (lt == cltWarning) ? Logger::warning : Logger::info;
 
-    m_pListLog->Append(errors, lv, 2);
+    static wxDateTime lastAutofitTime = wxDefaultDateTime;
+    if ( lastAutofitTime < (wxDateTime::Now() - wxTimeSpan::Seconds(3)) )
+    {
+        m_pListLog->Append(errors, lv, 2);
+        lastAutofitTime = wxDateTime::Now();
+    }
+    else
+        m_pListLog->Append(errors, lv);
 
     // add to error keeping struct
     m_Errors.AddError(lt, prj, filename, line.IsEmpty() ? 0 : atoi(wxSafeConvertWX2MB(line)), msg);

--- End code ---

headkase:
Ok, took a bit to run the process a few times but here are the results.

Processor: Intel Core i5 4670 quad-core @ 3.4GHz.  Build Options: Number of processes for parallel builds set to 4 for all runs.

All runs use the SVN 9851.

--

Without patch compile SVN 9851 with patched source.  No logging, with "-w" to suppress warnings.

Code::Blocks -> 1 min 38 sec.
Contrib Plugins Workspace -> 4 min 23 sec.

--

With patched SVN 9851 compile compiling patched source.  Compiler logging "Full Command Line", warnings set to default show.

Code::Blocks -> 1 min 49 sec.  0 errors, 770 warnings.
Contrib Plugins Workspace -> 28 min, 11 sec.  0 errors, 11812 warnings.

--

So, the patch has significantly improved the compile process.  Down to 28 minutes done what went for 3 hours and still not done.  The unpatched warnings pause on every warning as well, patched they just fly by.

Navigation

[0] Message Index

[#] Next page

Go to full version