Author Topic: Steam Version - Compilation slowdowns and crashes!  (Read 764 times)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2612
    • View Profile
Before upgrading to the steam version (my old version was 14.371) my compilation times were about 40-50 secs. Not too bad. But since going on to the Steam version my compilation times have gotten between 300-400% longer (120-170 secs). My source has not changed. I have an old 8gig Dual Core laptop for dev work, it's not the fastest but it was more than adequate up until this point.

Now watching the compile via task manager, the compiler seems to be launching each source file GLB pre-compiler, compilation and linker on its own process. My project is over 100 files, so this is driving my computer nuts resource-wise. It was doing this with my old compiler version too but there seemed to be a limit on the amount of processes launched during compilation, not so in this version I think? I am also now using over 3 gig in memory too as all this commotion is running at once. 2 out of every three compilation fails due to the machines resources being overwhelmed. My IDE completely freezes during the compilation process, hell my whole computer is useless during the compilation process.

My question, or request is, can the amount of compilation generated processes be added to the project options to allow users to tailor the compilation process to match their hardware? This would solve the problem I believe.
« Last Edit: 2019-Feb-07 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
Compiling multiple source files at once was one of new features in v15 if I remember correctly or maybe even in previous version, looks like v16 is running same number of threads as v15 - at least for my 13 files project, yet it's around 50 additional processes so it can hammer even i3 processor. It's good when You have minor changes in project and only few files need to be recompiled, but with more files or fresh compiling it can be disaster for lower spec pc. So it would be nice to have option / switch to disable this function or limit it to compile something like 2 - 3 files at single time.
btw. my editor doesn't have this feature, it still sits in old single file compilation cave :D
Check my source code editor for GLBasic - link

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2612
    • View Profile
The original version I mentioned had the new multi-threaded compile process and I was greatful for it. It was rock solid and it halfed my compile times... good stuff. But something has happened between that version and the current version that has reversed the benefits for me. Compile times are now a lot longer and unstable as for the first time, compiles can fail. This is causing no end of problems for me.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline hardyx

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 491
    • View Profile
I think a 64 bit GLB version needs more memory to compile. My projects don't have many files, but I think it should be a maximum of 20 files at once for example. Then the compilation can be performed by sets of files in a large project.
« Last Edit: 2019-Feb-08 by hardyx »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Yikes. That's some work to do. I'm so sorry.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1456
    • View Profile
Not sure if already being looked at but my v16 I ran and tried compiling an old project and I got a gpc.exe error

This is the only output in the immediate window
GPC - GLBasic Precompiler V.15.205 SN:aa18cc35 - 3D, NET
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
did you try to clean up the temp folder for the project first?
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2612
    • View Profile
Kinda solved the problem for myself by simply using a more powerful machine with more memory. Compilations still freeze that machine when the compiler is not using incredibuild but its much less intrusive, maybe 5-10 seconds, then full control returns, and the crashes are very infrequent now(once or twice a week at most).

Lesson learned, time to update my machine, I needed to anyways, GLB just kicked my butt a bit to remind me! :P
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1456
    • View Profile
did you try to clean up the temp folder for the project first?

No - I will try that next time so.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
GLBasic temporary directory used for compiling:
Code: GLBasic [Select]
%Temp%\glbasic

Another thing that You can try, is to get some info by running GLB precompiler (that translates code to c++) from command line. For example this is whole command used to compile basic project with 2 sources using latest GLBasic version:
Code: GLBasic [Select]
gpc.exe -pWIN32=1 -pGLB_VERSION=16.026 -N"ArtDemo" -X640 -Y480 -M0 -R60 -O"C:\Users\Me\AppData\Local\Temp\glbasic\gpc_temp" -L3 -EXPLICIT -P"D:\inne\glb_projekty_net\ArtDemo" -V"000.001" D:\inne\glb_projekty_net\ArtDemo\ArtDemo.gbas D:\inne\glb_projekty_net\ArtDemo\gl.gbas
Change it to reflect Your user name, proper directories/sources and see what result it gives, run it from cmd, or use with bat file (add ' >> output.txt' at the end - without ').
Yet I'm not sure if this will give any additional information, how 'old' is that old project?
Check my source code editor for GLBasic - link