GLBasic forum

Main forum => Bug Reports => Topic started by: bigsofty on 2019-Feb-07

Title: Steam Version - Compilation slowdowns and crashes!
Post by: bigsofty on 2019-Feb-07
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.
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: dreamerman on 2019-Feb-07
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
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: bigsofty on 2019-Feb-08
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.
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: hardyx on 2019-Feb-08
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.
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: Kitty Hello on 2019-May-30
Yikes. That's some work to do. I'm so sorry.
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: MrPlow on 2019-May-30
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
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: spacefractal on 2019-May-31
did you try to clean up the temp folder for the project first?
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: bigsofty on 2019-May-31
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
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: MrPlow on 2019-May-31
Quote from: spacefractal on 2019-May-31
did you try to clean up the temp folder for the project first?

No - I will try that next time so.
Title: Re: Steam Version - Compilation slowdowns and crashes!
Post by: dreamerman on 2019-May-31
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?