Projectsolver with a lot of assemblies.

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 11 years ago by Lennart Theil - Junior Software Developer, JOA
Avatar
Hi,
we've been using the editor with the .net addon for a while now, most of it to great satisfaction. The downside we've come across lately is the fact the projectsolver takes quite a while to load an assembly. It's not unrealistic for us to load 20 assemblies at startup, which does take a few seconds.
I'd like to know whether it's possible to load it in the background or something or whether you have some other nice trick for me?

Comments (6)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Lennart,

Great, glad to hear it! It should load fairly fast as long as you are caching the assemblies. If they are loading without cached info, it will take several seconds to get them all in. They could be loading without cached info if they have changed since last load too. Is this the case?


Actipro Software Support

Posted 11 years ago by Lennart Theil - Junior Software Developer, JOA
Avatar
That's indeed what I was thinking about as well, but I tried it with the mscorlib assembly and a few system dll's (which shouldn't change) and it still takes quite a few seconds to load every time.
The way I use the resolver is like this:
When an editor is loaded, use the following code:
CachePath = Path.Combine(joaFolderInformation.TempPath, @"IntelliPromptCache\");
AddExternalReferenceForSystemAssembly("System");
AddExternalReferenceForMSCorLib();
Etcetera for other assemblies.

At closing/disposing, use this:
PruneCache();
Dispose();

I checked the temp path, and indeed there are 6 files there created 3 days ago. So, for some reason it seems the assembly gets loaded even if it's in the cache already. I'm probably misusing the cache at the moment, so could you give me a direction on how to avoid this?

Regards,
Lennart
Posted 11 years ago by Lennart Theil - Junior Software Developer, JOA
Avatar
I found the bug. Apparantly the behavious from joaFolderInformation.TempPath was changed a while ago, so it has become unuseful for the cache. I changed it to another folder and it works like a charm now.
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Wonderful, glad to hear it!


Actipro Software Support

Posted 11 years ago by Lennart Theil - Junior Software Developer, JOA
Avatar
I do have another question on the same subject though. We let our users link other assemblies in runtime as well, and remove links. When an assembly gets removed from the resolver, the cache doesn't seem to reflect this and the assembly still stays in the cache (at least it's still there in the cache folder). Is that normal behavior?
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes it is there cached for the next time it is loaded so that it loads quickly. If there is any change in what is loaded later, it will be removed and replaced with an updated cache entry. Also, I believe calling PruneCache on app shutdown will delete cached items for which the assemblies no longer exist.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.