
Dim s As String
[Modified 2 years ago]
Dim s As String
[Modified 2 years ago]
Hi Gavin,
I'm sorry you're having performance issues. Are you sure you followed all the steps on this Getting Started documentation topic page?
When you said compared to a previous release, the latest is faster, can you tell us the old version/build you were on and the new version/build?
How many assemblies are you loading into the project assembly?
Hi,
Current version is 22.1.3. Previous version was 22.1.2.
We are using VS2019 v16.11.18 running on Windows 11 Professional.
We are loading up a total of 21 assemblies, this includes the MS Core library. If I use AddAllInAppDomain I experience the same performance issue, and if I omit our internal assemblies it works as expected.
We have implemented the code based on the Getting Started documentation.
Private mVBProjectAssembly As IProjectAssembly
Private mVBSyntaxLanguageCompletionProvider As CompletionProviderBase
Private mVBSyntaxLanguage As VBSyntaxLanguage
...
AmbientParseRequestDispatcherProvider.Dispatcher = New ThreadedParseRequestDispatcher()
AmbientAssemblyRepositoryProvider.Repository = New FileBasedAssemblyRepository("XXX")
...
mVBProjectAssembly = New VBProjectAssembly("XXX")
mVBSyntaxLanguageCompletionProvider = New VBCompletionProvider()
mVBSyntaxLanguage = New VBSyntaxLanguage()
mVBSyntaxLanguage.RegisterService(Of IProjectAssembly)(mVBProjectAssembly)
mVBSyntaxLanguage.RegisterLineCommenter(New LineBasedLineCommenter() With {.StartDelimiter = "'"})
mVBSyntaxLanguage.RegisterService(mVBSyntaxLanguageCompletionProvider)
...
SyntaxEditor1.Document.Language.UnregisterService(Of IProjectAssembly)()
mVBProjectAssembly.AssemblyReferences.Clear()
mVBProjectAssembly.AssemblyReferences.AddMsCorLib()
mVBProjectAssembly.AssemblyReferences.Add(Assembly.LoadFrom("XXX"))
SyntaxEditor1.Document.Language.RegisterService(Of IProjectAssembly)(mVBProjectAssembly)
I can see the assemblies cached in the file repository defined, and all the assemblies are loaded, it is just the performance that appears to be an issue. I was thinking that maybe we need to do something when we build the (Visual Basic) assemblies to make them compatible.
Thanks
Gavin
[Modified 2 years ago]
Hi Gavin,
We are able to load all our assemblies in the samples and have it perform normally. In my test, I had 29 assemblies loaded. Any .NET assembly should work the same. Are you loading the assembly references in a BackgroundWorker like we do in our samples, or in the main UI thread?
Are you able to reproduce this sluggishness in a new simple sample project that you could send us via a private support ticket? If you send a zip, please upload it directly to the ticket system instead of emailing it to us, so it avoids any mail server spam checks for .dlls in the zip file.
Hi,
Yes, I am loading the assemblies on a thread - this is not where I experience the performance issue.
The performance issue is after everything is set up and I start typing into the syntax editor e.g. "Dim s As String" - the moment I start typing "String" the performance of the autocomplete intelliprompt is affected.
I will create a sample project today and send it over to you.
Many thanks
Gavin
Hi,
We think we have resolved the issue. We had registered a completion provider but were not using it for anything, removing this has increased the performance. There is still a slight lag but this is probably just due the size of the script we are editing and the size of all of the assemblies we are including.
I also included all of our assemblies into your your sample browser application and the performance was fine.
Thanks for your help.
Gavin
Please log in to a validated account to post comments.