Extremly slow compile Clarion 11

Hi Richard, thanks for the links. For some time, I work with Clarion only on physical machines. Unfortunately, these compilation problems seems to be environmentally independent.
Today I had such a case again - IDE was hanging for a few minutes and when I clicked on “X” a couple of times it suddenly started the generation.

You used a) b) c), I referred to it as ABC.

Theres pro’s and con’s with oop and procedural. Oop is like a self contained program or service, its customisable, quick to deploy and use but could also have code which will never be used which increases its attack vector. Procedural can be the opposite.

These settings could/should speed things up.
Ideally, you’d have little to no background tasks, but as its not the case, checking what runs in the background to see what could slow things up a bit like AV scanners and Cortana stuff scanning documents, emails etc, and restricting them where possible will help, ie not AV scanning clarion folders.

Master Your Quantum | Microsoft Docs

HKLM\SYSTEM \CurrentControlSet\ Control\ PriorityControl\
Dword Win32PrioritySeparation
0x26 18 6
0x15 24 6
0x16 36 6

These 3 settings give the app with focus the most amount of cpu time. On slow laptops, once everything is loaded from startup, it can make some apps more responsive which can delay a machine upgrade.

Look at this post, released just today!
How to disable and re-enable hibernation - Windows Client | Microsoft Docs

Hibernation file stores the state of programs running and memory. Great if you suffer from unexpected power outages and dont have a battery backup, not so great if you need speed though as a copy needs to be made of each and every program service running plus a copy of ram dumped to disk to make it all start up fast. And all these extra read/writes for hibernation files will wear out SSD and NVMe drives more quickly!

Couple ways to do things as always.
cmd.exe powercfg.exe -h off|on

regedit.exe HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power
Dword HibernateEnabled 0|1
or
Dword HibernateEnabledDefault 0|1

HibernateEnabledDefault=1 on my machine and I thought I had it switched off, so I will be changing it to 0 later.

HibernateEnabled is referenced on loads of websites but as MS dont do a definitive list of reg settings like the do with group policy, I havent tested this reg setting to see if it does anything and how it relates to the one already in my registry. I am hopeful that eliminating the hibernation file might reduce the random hangs in C11 though.

A group policy XLS spreadsheet listing all group policies.
Download Group Policy Settings Reference Spreadsheet Windows 1803 from Official Microsoft Download Center

This is about the best I can find from MS on the registry which is a good overview but not a complete list of every registry setting to know what they do sadly.
Windows registry for advanced users - Windows Server | Microsoft Docs

FWIW. :grinning:

Edit. I should add, I dont really see the need to have hibernation running and a swap file running if there is enough ram and reliable power. Certainly the swapfile C:\pagefile.sys and the hibernation file c:\hiberfile.sys are doing very similar tasks with some duplication and I dont see the point in duplicating this stuff personally.

I just had the same thing again. Clicked “Generate and make” and the IDE froze for long minutes…

The spinner was rotating, but nothing was happening. The IDE was unresponsive.

After a good dozen or so minutes I clicked “X” a few times, and then on the taskbar from the context menu “Close” - then I was asked if I want to save the changes. and the app generation and building started immediately…

Hello…

  • Create a ramdisk
  • use in your project a local red file, and set all files in this ramdisk (sample at end…my ramdisk is Z)
  • Un-register all templates not used.

Tune your windows to reach the best perfomance
To make windows fast (really fast) install a SSD HD, and make 3 partitions. In one, install windows, and all software. In other, Clarion, and yours Clarion proyects. And in the last, set the only pagefile.sys, 20-30 Gb. (never can change the pagefile size), and set the enviroments variables to use this partition to ALL tmp files…

In this enviroment, Clarion run fast and fine…

-- Default Redirection for Clarion 11.0

[Copy]
– Directories only used when copying dlls
*.dll = %BIN%;%BIN%\AddIns\BackendBindings\ClarionBinding\Common;

[Debug]
*.obj = Z:\Cla11obj\debug
*.res = Z:\Cla11clw\debug
*.rsc = Z:\Cla11clw\debug
*.FileList.xml = Z:\Cla11obj\debug
*.map = Z:\Cla11map\debug

[Release]
*.obj = Z:\Cla11obj\release
*.res = Z:\Cla11clw\release
*.rsc = Z:\Cla11clw\release
*.FileList.xml = Z:\Cla11obj\release
*.map = Z:\Cla11map\release

[Common]
*._ea=Z:\Cla11clw
*.$ea=Z:\Cla11clw
*.$$$=Z:\Cla11clw
*.b1$=Z:\Cla11clw
*.I1$=Z:\Cla11clw
*.ico =.;%ROOT%\images\SD;%ROOT%\images;%ROOT%\template
*.gif =.;%ROOT%\images;%ROOT%\template
*.bmp =.;%ROOT%\images;%ROOT%\template
*.jpg =.;%ROOT%\images;%ROOT%\template
*.wmf =.;%ROOT%\images;%ROOT%\template
*.cur =.;%ROOT%\images;%ROOT%\template
*.clw=Z:\Cla11clw;%ROOT%\Libsrc\Win;%ROOT%\Libsrc;.
*.inc=Z:\Cla11clw;%ROOT%\Libsrc\Win;%ROOT%\Libsrc;.
*.equ=Z:\Cla11clw;%ROOT%\Libsrc\Win;%ROOT%\Libsrc
*.int=Z:\Cla11clw;%ROOT%\Libsrc\Win;%ROOT%\Libsrc
*.trn=Z:\Cla11clw;%ROOT%\Libsrc\Win;%ROOT%\Libsrc
*.bpp=Z:\Cla11clw
*.bct=Z:\Cla11clw
*.exp=.;Z:\Cla11clw
*.lnk=Z:\Cla11clw
*.map=Z:\Cla11clw
*.shp=Z:\Cla11clw
*.svb=Z:\Cla11clw
*.ap~=Z:\Cla11clw
*.dc~=Z:\Cla11clw
*.log=Z:\Cla11clw
*.b1$=Z:\Cla11clw
*.chm = %BIN%
. = .; %ROOT%\libsrc\win; %ROOT%\images; %ROOT%\template\win; %ROOT%\convsrc; %ROOT%\resources
*.lib = .;%ROOT%\lib
*.obj = %ROOT%\lib
*.res = %ROOT%\lib
*.dll = .;%ROOT%\bin;%BIN%
*.tp? = %ROOT%\template\win;%ROOT%\template
*.trf = %ROOT%\template\win;%ROOT%\template
*.txs = %ROOT%\template\win;%ROOT%\template
*.stt = %ROOT%\template\win;%ROOT%\template

Also been having similar slow compiles after first attempt.

Under Generate and Run options, I changed option to ‘Don’t Generate Trace file’ and compiling is lightning fast every time.

1 Like

Can you please specify where this option exists ? I can’t find this .

Best regards,

Hi Nikola, take a look at the drop-down menu under the “Generate and Build in Batch” button (on the “Applications” window/tab). I don’t know how to set these options for the button on the main toolbar.

1 Like

That should only affect the build if the Tools - Application Options have “Debug Generation” checked. That box should be Unchecked by default. Unless you are developing templates you would want to have that unchecked in App Options

You can from the Menu or Ctrl+Shift+M

Might it be helpful to distinguish between Generate & Make/Compile?
I’ve had slow generation at times, but compile seems to have little variance.

The Output panel will show separate elapsed times for Generation versus Compile

Begin Batch Processing (Generation and Compile) at 4/28/2021 8:26:52 AM
Total applications to process 1
Clarion 10.0.12799 - Clarion.NET 4.0.12799
---------------------------------------
** Batch Processing (CLUBMGR) ** (1/1)
Code Generation start at 8:26 AM finish at 8:26 AM , elapsed time: 00:00:00.4172033

---------------------------------------
Executing Post Action: Compile
Application: CLUBMGR
Project: CLUBMGR
---------------------------------------
Compile start at 8:26 AM finish at 8:26 AM , elapsed time: 00:00:02.1619634
---------------------------------------
Batch Processing Summary
Generation and Compile was finished at 4/28/2021 8:26:54 AM and took 00:00:02.1619634
1 Like

Problem is on the generate - it is very slow sometimes.
So, while generating, I right-click the Clarion icon on the Taskbar and choose ‘Close Window.’ The ‘Save changes’ confirmation window pops up and the generation immediately speeds up.
I let the generation finish then click ‘Cancel’ on the ‘Save changes’ confirmation.
Compilation then starts and completes.

I do this now every time I have slow generation and it saves me so much time.

Clearly there is Clarion problem but at least I can work around it.
Hope this helps others too.

1 Like

I believe it is also worth while to check the size of your Template Registry file. It has a tendency to grow with each open of a project (no addition or changes in templates).

Does anyone have any idea why the generation is slow but immediately speeds up as soon as I click ‘Close Window’?
This happens in all versions that I use from 10 to 11.1

Carl

1 Like

I still have the very same issue unresolved. Everything works fine and suddenly, on some compilation, IDE seems to hang right at the beginning (or even before starting) of module generation. It may remain like this for l tens of minutes, but as soon as I try to close the IDE, generation starts immediately.
Because generating and building applications from command line always is very fast, I suspect that the problem is somewhere at the interop interface between the IDE (SharpDevelop) and the “Clarion engine”.

Regards,
Andrzej

1 Like

I have this situation since forever. Seems that if during clw generation you change focus from Clarion to some other app, it worsens, meaning it will very often stall the generation.
I got used to clicking Close and then cancelling it in order to get the generation going again…

1 Like

This started happening to me ± 1 1/2 weeks ago.
Windows 11, Clarion 10.0.12799.

Generating Modules would take ages.
App that usually took ± 5 minutes can now sometimes take ± minutes just to generate modules.
Compiling and linking is still fast.

Tried all the possible solutions.
Also cleaned temp folders, etc.

Has anybody came up with a solution that made Clarion fast again?

Regards
Johan de Klerk

1 Like

It’s been like this a long time - See my solution above Jun '21. I use this often.
HTH
Carl

Hi Carl,
Jip, this is what I now do as well.
You advice helped.

Just thought someone found a permanent solution to not have to do this.

Regards
Johan de Klerk

It might have occurred because of the 4.30 version of the Cape templates. Fixed in 4.31. If you install the latest StringTheory you’ll automatically get this.