Author Topic: Codeblocks long startup time  (Read 7788 times)

Offline AndrewCot

  • Regular
  • ***
  • Posts: 477
Re: Codeblocks long startup time
« Reply #15 on: December 31, 2021, 04:27:24 am »
I tried the config file and found that the Cygwin compiler was always shown in the Compilers auto-detection that pops up on start-up as Invalid due to the config not having a <compiler><sets><cygwin> [MASTER_PATH] entry.  The C::B I was testing against was SVN r12612 code with the addition of timing output to the log to measure the approximate C::B startup time and the compiler XML files from ticket 374 as I am trying to track down a C::B slow startup issue Miguel seen. Miguel can I get a copy of your config?

After adding in the <compiler><sets><cygwin> [MASTER_PATH] entry I did not see any major slow down in the C::B startup (the XML file changes add an extra 1 second).

Cappedcrusader12 can I get the list of GCC and other compiler's you have installed with their root or bin directory along with what version of the compiler it it. For example:
      MSYS2 Mingw64 - C:\msys64\mingw64

      I have the following compiler's installed, but I prefix them with "test." when I am not using or testing them:
            MSYS2 Mingw64 - C:\msys64
            TDM 64 -  C:\TDM-GCC-64
            TDM 32  C:\TDM-GCC-32
            Mingw64 -  C:\mingw64
            Mingw32 - C:\mingw32
            Mingw -  C:\MinGW
            Mingw64 Guyutongxue C:\mingw64_gtx
            Mingw64 WinLib C:\mingw64_winlib
            Cygwin -  C:\cygwin64

Offline AndrewCot

  • Regular
  • ***
  • Posts: 477
Re: Codeblocks long startup time
« Reply #16 on: December 31, 2021, 05:32:14 am »
See https://sourceforge.net/p/codeblocks/tickets/1171/ for the Cygwin masterpath ticket and fix.

Still no closer on the startup time issue.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1019
Re: Codeblocks long startup time
« Reply #17 on: December 31, 2021, 10:59:57 am »
Quote
Miguel can I get a copy of your config?

I am on Xmas vacation, far from my main computer. I'll send it as soon as I return home (ten days).

Offline AndrewCot

  • Regular
  • ***
  • Posts: 477
Re: Codeblocks long startup time
« Reply #18 on: December 31, 2021, 11:10:09 am »
No worries. I was away last week and this week have eased back into it.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1019
Re: Codeblocks long startup time
« Reply #19 on: December 31, 2021, 01:36:01 pm »
I have downloaded using Remote Desktop the configuration from my computer at work, it is very similar to that of my home system.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3169
Re: Codeblocks long startup time
« Reply #20 on: January 04, 2022, 09:42:43 pm »
@Cappedcrusader12
How good are you with computer?
Are you able to compile codeblocks by yourself?

Can i send you a compiled version of codeblocks with debug symbols? Maybe over WeTransfer?

@AndrewCot Are your builds with debug symbols?

Edit: i should say, that i looked at codeblocks startup with IntelVtune and i can not really find some slow parts, beside plugin loading and there specially a very slow GetLongPathName, but this should not lead to 30 sec loading time....

« Last Edit: January 04, 2022, 09:45:31 pm by BlueHazzard »

Offline AndrewCot

  • Regular
  • ***
  • Posts: 477
Re: Codeblocks long startup time
« Reply #21 on: January 05, 2022, 12:10:12 am »
@BlueHazzard I have run both the devel31_64 and output31_64 binaries and they both start between 2 and 3.5 seconds depending on if the GNU GCC exe can be found as the code exits early if the gcc.exe cannot be found.

My analysis, which is based on adding timing output to the log and as such is crude indicates that the slow part appears to be the code in the AutoDetectInstallationDir() function when there are allot of compilers that are registered.  I have refactored the AutoDetectInstallationDir()  code as part of ticket 1117 as this was needed in order to determine if the compiler was not found or invalid and the code was convoluted and hard to follow (aka maintain), but ticket 1117 is queued up and there are other tickets I want to get resolved before it.  The timing output to the log is included in my latest unofficial installer release.

I have tested using Miguel's config and it does not cause the load to slow down. I can only assume, which could be wrong, is that the directories being searched in the startup on a few machines cause the slowdown due to something specific on those machines. This is why I asked last month for Cappedcrusader12  to supply the compilers and directories so I could try and replicate the issue be changing my setup to hopefully match.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1019
Re: Codeblocks long startup time
« Reply #22 on: January 18, 2022, 10:07:13 am »
I have experienced the slowdown (also 30 seconds) when mingw32-gcc.exe is in the system path.

Offline AndrewCot

  • Regular
  • ***
  • Posts: 477
Re: Codeblocks long startup time
« Reply #23 on: January 18, 2022, 11:09:20 am »
Can you post your path?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1019
Re: Codeblocks long startup time
« Reply #24 on: January 18, 2022, 11:12:33 am »
We have discussed this already, please see r12661 that includes your proposed changes to options_gcc.xml

Offline Cappedcrusader12

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks long startup time
« Reply #25 on: January 27, 2022, 01:23:53 pm »
Sorry for my long hiatus, but i was on vacation as well and have been preparing for exams.
 
I tried the config file and found that the Cygwin compiler was always shown in the Compilers auto-detection that pops up on start-up as Invalid due to the config not having a <compiler><sets><cygwin> [MASTER_PATH] entry.  The C::B I was testing against was SVN r12612 code with the addition of timing output to the log to measure the approximate C::B startup time and the compiler XML files from ticket 374 as I am trying to track down a C::B slow startup issue Miguel seen. Miguel can I get a copy of your config?

After adding in the <compiler><sets><cygwin> [MASTER_PATH] entry I did not see any major slow down in the C::B startup (the XML file changes add an extra 1 second).

Cappedcrusader12 can I get the list of GCC and other compiler's you have installed with their root or bin directory along with what version of the compiler it it. For example:
      MSYS2 Mingw64 - C:\msys64\mingw64

      I have the following compiler's installed, but I prefix them with "test." when I am not using or testing them:
            MSYS2 Mingw64 - C:\msys64
            TDM 64 -  C:\TDM-GCC-64
            TDM 32  C:\TDM-GCC-32
            Mingw64 -  C:\mingw64
            Mingw32 - C:\mingw32
            Mingw -  C:\MinGW
            Mingw64 Guyutongxue C:\mingw64_gtx
            Mingw64 WinLib C:\mingw64_winlib
            Cygwin -  C:\cygwin64

My compilers are:
 TDM 64 -  C:\TDM-GCC-64 ver. 10.3.0-2
 TDM 32 - C:\TDM-GCC-32
They are both installed from the web installer.
@BlueHazzard i think i'm a bit above average when it comes to computers, I do not know what do you mean by compiling codeblocks. Can you elaborate?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1019
Re: Codeblocks long startup time
« Reply #26 on: January 27, 2022, 02:00:50 pm »
Can you check the last nightly?. It has a change (now reverted) in compiler detection.

Offline Cappedcrusader12

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks long startup time
« Reply #27 on: January 27, 2022, 05:38:57 pm »
I installed it now and it takes 40 seconds to open.

Offline Cappedcrusader12

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks long startup time
« Reply #28 on: March 19, 2022, 12:59:42 pm »
Ok, so after reinstalling the 20.03 multiple times and repeteadly deleting the local files, the loading time fixed momentarily, but after restarting the PC the problem returned.
« Last Edit: March 19, 2022, 01:25:48 pm by Cappedcrusader12 »

Offline Cappedcrusader12

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks long startup time
« Reply #29 on: April 15, 2022, 07:20:02 am »
Ok, after reinstalling windows it now opens quick.