X# slowdown in VS when editing PRG for a long time

This forum is meant for questions and discussions about the X# language and tools
User avatar
Chris
Posts: 4905
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

X# slowdown in VS when editing PRG for a long time

Post by Chris »

Hi Leonid,

We're right now testing internally a new build, if all goes well it should be available soon for beta testing!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

X# slowdown in VS when editing PRG for a long time

Post by leon-ts »

Hi Chris,
Glad to hear that a new version is on the way. I'm looking forward to it.
Best regards,
Leonid
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

X# slowdown in VS when editing PRG for a long time

Post by robert »

Leonid,
We have replaced the way in which the identifiers are highlighted. The original code used a method inside the Community.VisualStudio.Toolkit.dll which uses the VS TextSearch service. You have experienced yourself that this VS services is not what it used to be <g>.
During the classifier phase (where the colors for editor tokens are determined and more) we were already collecting the unique identifiers (for identifier case synchronization). We expanded that code to collect the locations where an identifier was found. We now use that to match the identifiers.
That gives us more control and I have the idea (not benchmarked) that it is even faster, because the only lookup needed is a lookup in a dictionary of the identifier of the current token. The new code also respects the Case sensitivity of the project properties. When the project is compiled in case-sensitive mode, then only identifiers that match in case are highlighted. Otherwise, all occurrences are highlighted, also the once with a different case.
We are struggling with a threading issue in VS 2017/2019. Once that is solved, we will create an installer that you can test. With a bit of luck, that installer is ready today, or Monday at the latest.

Robert

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

X# slowdown in VS when editing PRG for a long time

Post by leon-ts »

Robert,
This is great news. Highlighting identifiers is a very convenient thing. Now I really miss it (I had to turn it off due to the problems described above). It's good that in the new version it will be possible to turn it back on.
Thank you!
Best regards,
Leonid
Post Reply