-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
Description
ClearScript Version: 7.5
.NET Version: 4.6.2
Issue:
We are integrating ClearScript into our .NET application, which heavily utilizes COM interop. After adding our primary COM object using AddHostObject, any access from script triggers extensive and repeated calls to TypeLibConverter.ConvertTypeLibToAssembly
These repeated type library conversions cause significant delays (minutes), and Visual Studio's Modules window shows COM libraries loading multiple times.
We've already tried:
- Using HostItemFlags.DirectAccess — No improvement
- Switching to AddCOMObject instead of AddHostObject — No improvement
- Ensuring Embed Interop Types is set to false — No improvement
- Wrapping objects explicitly using Marshal.CreateWrapperOfType helps initially, but associated COM object accesses trigger the issue again.
- We have tried in both the legacy JScript engine and V8 engine - does not seem to make a difference.
Questions:
Is there a recommended approach or setting in ClearScript to avoid repeated COM type library loading? It's taking around 5m to load the info and finally return.
Any guidance would be greatly appreciated—thanks!