Hello,
When I add CreateMenu, the compilation becomes very slow.
I remove CreateMenu, the compilation becomes very fast.
My example is too large to be put here. I'll try to write a little test code to show that. May be I'll find what's wrong in my code...
Why does it take time to compile?
Re: Why does it take time to compile?
PureBasic 6.20 beta 2 (x64) | Windows 10 Pro x64 | Intel(R) Core(TM) i7-8700 CPU @ 3.20Ghz 16 GB RAM, SSD 500 GB, PC locally assembled.
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Re: Why does it take time to compile?
Do you have MS security essential or another anti-virus software ? if yes try to disable them to see if it impact the compile time.
Re: Why does it take time to compile?
Yes, I have MS Security Essential.
I disabled the real-time protection, and the compilation became fast even with CreateMenu. I enabled the real-time protection, and the compilation became slow.
When I say compilation, it is F5 with Debugger enabled. If I create an executable, the compilation is fast, even with real-time protection enabled.
Thanks, Fred.
Jean.
I disabled the real-time protection, and the compilation became fast even with CreateMenu. I enabled the real-time protection, and the compilation became slow.
When I say compilation, it is F5 with Debugger enabled. If I create an executable, the compilation is fast, even with real-time protection enabled.
Thanks, Fred.
Jean.
PureBasic 6.20 beta 2 (x64) | Windows 10 Pro x64 | Intel(R) Core(TM) i7-8700 CPU @ 3.20Ghz 16 GB RAM, SSD 500 GB, PC locally assembled.
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Re: Why does it take time to compile?
If I set my temporary directory ( C:\Users\Jean\AppData\Local\Temp ) in the excluded directory in MS Security Essential, the compilation runs fast, even F5 + Debugger.
I tried the following things without success. For example
excluding these processes:
C:\Program Files\PureBasic\Compilers\pbcompiler.exe; not good
C:\Users\Jean\AppData\Local\Temp\PureBasic_Compilation0.exe; not good
C:\Program Files\PureBasic\PureBasic.exe; not good
Setting the current directory in the option of the compiler to the directory where there is the pb source, and setting this directory in the excluded directory in MS Security Essential. Not good.
Enabling "Create temporary executable in the source directory", and excluding the source directory in MS Security Essential, or excluding the process source\directory\PureBasic_Compilation0.exe. Not good.
File / Preferences / Compiler / Default. I set the current directory in the option of the compiler to the directory where there is the pb source, and setting this directory in the excluded directory in MS Security Essential. Not good too.
The only solution I found is to let all these options in blank, and set my temporary directory ( C:\Users\Jean\AppData\Local\Temp ) in the excluded directory in MS Security Essential. In this case, F5 + Debugger runs fast.
It is not very safe to let the AppData\Local\Temp in the excluded directory in MS Security Essential. I remove it when I do not compile...
I tried the following things without success. For example
excluding these processes:
C:\Program Files\PureBasic\Compilers\pbcompiler.exe; not good
C:\Users\Jean\AppData\Local\Temp\PureBasic_Compilation0.exe; not good
C:\Program Files\PureBasic\PureBasic.exe; not good
Setting the current directory in the option of the compiler to the directory where there is the pb source, and setting this directory in the excluded directory in MS Security Essential. Not good.
Enabling "Create temporary executable in the source directory", and excluding the source directory in MS Security Essential, or excluding the process source\directory\PureBasic_Compilation0.exe. Not good.
File / Preferences / Compiler / Default. I set the current directory in the option of the compiler to the directory where there is the pb source, and setting this directory in the excluded directory in MS Security Essential. Not good too.
The only solution I found is to let all these options in blank, and set my temporary directory ( C:\Users\Jean\AppData\Local\Temp ) in the excluded directory in MS Security Essential. In this case, F5 + Debugger runs fast.
It is not very safe to let the AppData\Local\Temp in the excluded directory in MS Security Essential. I remove it when I do not compile...
PureBasic 6.20 beta 2 (x64) | Windows 10 Pro x64 | Intel(R) Core(TM) i7-8700 CPU @ 3.20Ghz 16 GB RAM, SSD 500 GB, PC locally assembled.
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Re: Why does it take time to compile?
Try this. It also excludes the assembler, linker etc. (the linker creates executable in TEMP, which might be the reason it is scanned more than usual)CONVERT wrote:It is not very safe to let the AppData\Local\Temp in the excluded directory in MS Security Essential. I remove it when I do not compile...
and exclude not the whole TEMP but TEMP\PureBasic_Compilation0.exe to TEMP\PureBasic_Compilation9.exe for example.
Make sure you add the exclusions to 'Excluded Processes'
For your project/file, set the (default) compiler option "[X] create temporary executable in the source directory"
Re: Why does it take time to compile?
Thanks Danilo.
I tried what you wrote. It did not not change anything.
I emptied my temp directory and did F5 with debugger, to see what happens in the temp directory. It seems it is a little more complicated.
A new directory appears, changing its name at every run: Temp\Purebasic19853685, Temp\Purebasic20121383 etc. I did not find a rule in theses numbers. This directory disappears at the end.
This new directory contains plenty of .lib, .asm, .rc, .res, or without suffixe. They come from Purebasic (Gadget.lib, Image.lib, ImagePlugin.lib, Manifest, Map.lib, etc.).
It creates also a TMP file Temp\~12EF230.TMP changing at every run. It disappears at the end.
It creates Temp\PB_EditorOutput.pb and Temp\PureBasic_Compilation0.exe, which remain after the compilation. PureBasic_Compilation0.exe has the same size as ~12EF230.TMP. I suppose ~12EF230.TMP is renamed to PureBasic_Compilation0.exe at the end.
If I set the (default) compiler option "[X] create temporary executable in the source directory", PureBasic_Compilation0.exe is created in the source directory instead of Temp directory. But the slowing compilation remains.
I tried what you wrote. It did not not change anything.
I emptied my temp directory and did F5 with debugger, to see what happens in the temp directory. It seems it is a little more complicated.
A new directory appears, changing its name at every run: Temp\Purebasic19853685, Temp\Purebasic20121383 etc. I did not find a rule in theses numbers. This directory disappears at the end.
This new directory contains plenty of .lib, .asm, .rc, .res, or without suffixe. They come from Purebasic (Gadget.lib, Image.lib, ImagePlugin.lib, Manifest, Map.lib, etc.).
It creates also a TMP file Temp\~12EF230.TMP changing at every run. It disappears at the end.
It creates Temp\PB_EditorOutput.pb and Temp\PureBasic_Compilation0.exe, which remain after the compilation. PureBasic_Compilation0.exe has the same size as ~12EF230.TMP. I suppose ~12EF230.TMP is renamed to PureBasic_Compilation0.exe at the end.
If I set the (default) compiler option "[X] create temporary executable in the source directory", PureBasic_Compilation0.exe is created in the source directory instead of Temp directory. But the slowing compilation remains.
PureBasic 6.20 beta 2 (x64) | Windows 10 Pro x64 | Intel(R) Core(TM) i7-8700 CPU @ 3.20Ghz 16 GB RAM, SSD 500 GB, PC locally assembled.
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).
Come back to 6.11 LTS 64 bits because of an issue with #PB_ComboBox_UpperCase in ComboBoxGadget() (Oct. 10, 2024).


