cancel
Showing results for 
Search instead for 
Did you mean: 

Code Stage (code proprerties) vs .NET Custom Method (DLL )Thanls

MassimilianoBel
Level 4
Hi , in term of performance and usability it a best solution to implement a custom methods inside a c# method in refer in the Code Tab of Code Stage, insteand put the implementation of c# method directly code tab of code stage ?

Thanks​

------------------------------
asd max
------------------------------
15 REPLIES 15

AmiBarrett
Level 12
At the end of day, it really just boils down to user preference.

The major upside of having custom code in code stages vs DLL files, is that you don't have to worry about propagating the DLLs to all systems - the code is instead stored in the SQL database. It also makes it easier to collaborate on new and/or modified code. I suspect (but currently have no solid proof) that these are compiled at run-time locally, but it's quick enough that you shouldn't notice it.

That being said, I can see an argument being made for creating custom DLLs if you want to lock down the code to where it can no longer be modified (especially by multiple users).

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Thanks Ami, performance whicha res the best ?

------------------------------
Massimiliano Bellisario
------------------------------

In theory, it's probably the DLL files if the code is being compiled locally at run-time. But again, you shouldn't notice enough of a difference.

Edit: Just to expand upon this,  you'll need to write code to the code stages anyway, in order to reference the methods in the DLL file(s). Either way, you'll still have code to compile.

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Sorry, but the DLL must be most efficient (performance) then Code Stage (i think in this case BP must compile every time the code c# write in the code stage / code tab).

Thanks

------------------------------
Massimiliano Bellisario
------------------------------

Blue Prism will JIT compile anything in code stages when the process runs. Any subsequent calls to a code stage within that process should be in memory after the first compilation. 

With DLLs, BP will have to load them into memory when the process runs, but I imagine the cost of loading the DLL is lower than JIT compiling the code in code stages.

With all that said, one of the benefits I find to placing custom code in DLLs is better debugging of that code in Visual Studio or Visual Studio Code (assuming you create a test harness).

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

but with DLL custom i must distribuite the DLL...

------------------------------
Massimiliano Bellisario
------------------------------

Again: Both scenarios are loaded into memory, and the JIT compile time should not be noticeable. So yes, while there is an efficiency gain from using custom DLLs, it shouldn't be enough to really affect anything.

If you want to avoid creating custom DLL files, then use the built-in code editors/stages within Blue Prism.

Edit: Alternatively, DLLs can be on a shared file location. However, I have seen this cause issues on system startup in some cases, due to the connection to the share not being active until first accessed through Windows (not through code in BP).

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Yes, if you choose to go the DLL route you will have to account for the distribution of those DLLs.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

How can i distribuite the DLL ?

------------------------------
Massimiliano Bellisario
------------------------------