Primary purpose of "Compile" and "Recompile All"  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
chi jeongki
Posts: 39
Joined: 29 Nov 2007
Has thanked: 8 times
Been thanked: 2 times

Primary purpose of "Compile" and "Recompile All"

Postby chi jeongki » 19 Aug 2017

I thought that "Compile" is to reduce time to compile than "Recompile All"
But now, I guess my thought is wrong.
Even if one indicator is modified, "Compile" will compile all indicators, signals, and functions to build new assembly.
(In visual studio, Build, Rebuild, Build Solution, Rebuild Solution turns into "Recompile All" for MC.NET, if any code file is modified. if no code file is modified, visual studio will still compile for Rebuild, Rebuild Solution, but nothing happen to MC.NET assembly. As I observed)

Then, what's the difference between "Compile" and "Recompile All" ?
"Compile" will load the new assembly and destroy and recreate the study I did "Compile" in a new assembly if the study is currently applied to a chart.
"Recompile All" will load the new assembly and destroy all studies currently applied to charts and recreate them all in a new assembly.

In other words, "Compile" will provide new assembly only to the study I did "Compile".
For other studies currently applied to charts are to live with old assembly which was used when they were created.

"Recompile All" moves all studies to a new environment (the newly created assembly).

If the signal which I did "Compile" is currently applied to a chart and has TCP connection to outside program, then user has to clear this connection and move this connection to a new environment (the newly created assembly), otherwise the outside program will still communicate with TCPClient class in old assembly and new attempt to create TcpListener on the port will fail because old TcpListener in old assembly is still listening.

If studies have dependency in the order applying to a chart, then "Recompile All" will be a problem since we can not control the order studies are applied to charts.

I will appreciate any comment on my current understanding.

Another question:
Why MC.NET does not unload old assembly after "Recompile All" is executed.?
I have 30 of them in Multicharts64.exe process now.

old assemblies.png
old assemblies.png (163.87 KiB) Viewed 180 times

User avatar
Henry MultiСharts
Posts: 8503
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2731 times

Re: Primary purpose of "Compile" and "Recompile All"  [SOLVED]

Postby Henry MultiСharts » 21 Aug 2017

Please see my reply in the other thread viewtopic.php?t=50923&p=126847#p126847
As for the unloading the old assemblies -we will check that and get back to you.

User avatar
Henry MultiСharts
Posts: 8503
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2731 times

Re: Primary purpose of "Compile" and "Recompile All"

Postby Henry MultiСharts » 22 Aug 2017

chi jeongki wrote:Why MC.NET does not unload old assembly after "Recompile All" is executed.?
I have 30 of them in Multicharts64.exe process now.
chi jeongki, this behavior is by design. The assemblies remain loaded, but are not being used. This should not generate any issues.
These users thanked the author Henry MultiСharts for the post:
chi jeongki


Return to “MultiCharts .NET”