Page 1 of 1

APL+Win running as an in-process server

PostPosted: January 12th, 2011, 10:34 am
by Gert.Glantz
Running APL as an in-process server (DLL instead of EXE) certainly has both pros and cons. It's not all clear to me what all the consequences would be but I can see some advantages:

1) Improved performance when calling APL from C# as they could share the same process space.

2) Easier deployment using for example ClickOnce. APL could be distributed as registration free COM.

3) Separating the APL engine and the Session Manager would be an advantage in creating a new IDE written in .NET with the latest GUI features.

/Gert

Re: APL+Win running as an in-process server

PostPosted: January 14th, 2011, 5:20 pm
by Tech Support
Gert.Glantz wrote:Running APL as an in-process server (DLL instead of EXE) certainly has both pros and cons. It's not all clear to me what all the consequences would be but I can see some advantages:

1) Improved performance when calling APL from C# as they could share the same process space.


Any improvement would only be significant for ⎕WI calls from APL+Win to WSEngine. However, that is where the current bottleneck is located. It might be possible to achieve some speedup for C# to WSEngine, but that cost is pretty insignificant compared to ⎕WI calls, and so it is doubtful it would actually be worth doing. The only place where C# calls to WSEngine might be slow is when the fractal surface area of the argument and/or result arrays are large (i.e., for deeply/densely nested arrays). In that case, the arguments and result must be represented as Variant Arrays and the more leaves there are in these arrays, the slower they are to create and encode/decode. In such cases, some kind of “wrapplingâ€

PostPosted: January 19th, 2011, 4:06 am
by Gert.Glantz
Thanks a lot for your answers which clarifies a lot.

One more question regarding performance:

I’ve heard/read somewhere that context switching between different processes can be expensive. Is this not a significant factor in slowing down calls compared to passing data over the process boundry?

/Gert