We are not using the -preloadCLR parameter, but it seems like the DLLs inside the -assemblies folder are being preloaded anyways. The initial memory usage seemed to increase every time we add a new DLL to the folder point to by -assemblies. If we remove some of the assemblies, the initial memory also decreases.
Any ideas?
If you are just using the AVM (no PDSOE), the files in -assemblies should not be loaded until the AVM loads the CLR (more exactly, the files in assemblies.xml, not just the files in -assemblies). Any reference to .NET when executing or compiling ABL code will cause the AVM to load the CLR.
If you just start the Procedure Editor, without running any code, do you see this behaviour? Or better still, just run a simple piece of .r code which displays a message then quits.
Does it load everything referenced by assemblies.xml at once? We have some DLLs that we don't want to load until the actual class that referenced them is used.
Windows
|
-preloadCLR
|
|||
Use with
|
Maximum value
|
Minimum value
|
Single-user default
|
Multi-user default
|
Client Session
|
—
|
—
|
—
|
—
|
Does it load everything referenced by assemblies.xml at once? We have some DLLs that we don't want to load until the actual class that referenced them is used.
Flag this post as spam/abuse.
When the AVM loads the CLR, it loads everything referenced in assemblies.xml (along with dependencies). IIRC, the supported position is that all required assemblies should be referenced in the assemblies.xml file. This might have changed, I haven't kept up with it.
So the -preloadCLR documentation is not accurate;
If you do not specify -preloadCLR, the AVM loads the CLR the first time ABL refers to, or uses, a .NET type or object either at compile time or runtime. The individual assemblies are loaded as needed.
[EDIT] Does not apply to the assemblies inside the folder -assemblies points to.
So the -preloadCLR documentation is not accurate;
If you do not specify -preloadCLR, the AVM loads the CLR the first time ABL refers to, or uses, a .NET type or object either at compile time or runtime. The individual assemblies are loaded as needed.
Flag this post as spam/abuse.
The observed behavior of loose DLLs inside the folder -assemblies points to is in question.
Joseph,
Garry and I have talked and we have a few things:
1) We are checking as to whether the documentation I referenced is correct or not. We will get back to you on that.
2) As far as the loading of "loose" assemblies (i.e. assemblies that are in the directory pointed to by the -assemblies startup parameter but are NOT lincluded in the assemblies.xml file), a look at the source code does not show that we load those assemblies. We walk through the assemblies.xml and load the files listed in it. Please do a simple test by running prowin32 from a command prompt (proenv) using the -assemblies parameter only and have no loose files in the -assemblies directory then in the editor do a simple MESSAGE "HELLO" VIEW-AS ALERT-BOX then look at memory consumption via Task Manager. Write down that number then add your loose assemblies back and run the test again (from the command line). Report back with both numbers.
Brian
Sorry, when I said loose DLLs. Those are DLLs not installed in the GAC, but are referenced inside the assemblies.xml.
After code review, and discussion with others, I believe that particular statement in the doc is incorrect. When the AVM loads the CLR, it will load all the assemblies referenced in assemblies.xml, regardless of whether -preloadCLR is used or not.
Joseph,
Since I already have a case open for you on another issue I will open a second one and log the doc bug.
Brian