xsharp.eu • Still problems with typing performance
Page 1 of 2

Still problems with typing performance

Posted: Tue Jul 06, 2021 12:16 pm
by Kees Bouw
After not having used X# for a while I installed the latest version (2.8b) and I still cannot type normally. Very disappointing.

The yellow warning appears:

"We've noticed that extension 'XSharp Visual Studio Integration' is slowing typing performance."

Still problems with typing performance

Posted: Tue Jul 06, 2021 3:12 pm
by Chris
Kees, is that with the option "Show completion list after a char is typed" enabled or disabled?

Still problems with typing performance

Posted: Wed Jul 07, 2021 9:24 am
by ic2
Hello Chris,
Chris wrote:Kees, is that with the option "Show completion list after a char is typed" enabled or disabled?
Even if it's on this should not happen. I don't even want to use X# (to replace VO eventually) when I can't set a completion list to show. Intellissense in VS is IMO the weakest point of X# ; poor compared to VO anyway. I think this question should not need to be asked after many version with this performance problem.

Why is this unsolvable?

Dick

Still problems with typing performance

Posted: Wed Jul 07, 2021 10:42 am
by robert
Dick,

The problem is not unsolvable, but difficult for larger projects because of the large number of possible candidates to include in completion lists.

At this moment when you type something like "Left" in the editor then the intellisense engine will check for the following items and include them in the completion list
- Locals that start with "Left"
- Fields and Methods in the current class that start with "Left"
- Functions in all referenced X# assemblies that start with "Left"
- Types in all namespaces that the current file includes (with USING statements) that start with "Left"
- (Sub)namespaces in all namespaces that the current file includes (with USING statements) that start with "Left"
- keywords that start with "Left"

Apparently that is too much.

And when you continue typing when the search is going on this has to start all over again.

In VO things were much simpler because the number of types, methods etc was MUCH smaller than in .Net. If you only look at system.dll and mscorlib.dll and compare the # of types and methods in these assemblies with what we had in VO then you will get the picture.

For the next release we have now disabled this option (again).

What we plan to do is:
- Switch from the synchronous to the asynchronous completion provider inside Visual Studio (we could not do this before because the asynchronous completion provider did not exist in VS 2015). I suspect that alone will already make a big difference.
- Delay the search until a certain amount of time has passed by to make sure that if you are typing fast we will not start searching when you are still typing
- Add a few smart views to our intellisense database (an in memory SQLite database) so we can retrieve all the info we need with a single lookup and so we can do a simple "top <n>" query to the query to limit the # of rows returned.


Robert

Still problems with typing performance

Posted: Wed Jul 07, 2021 1:35 pm
by Kees Bouw
Robert,

Thank you for explaining. Knowing why something does not work already takes away some frustration. You mention several areas where intellisense searches in. Maybe another possibility for improvement would be to make each area optional in settings. I think I would already be happy if there is a working autocomplete just for the locals in the current source-file and the language keywords.

Being able to type normally with some level of autocomplete, and the correct handling of dbf/cdx databases especially regarding the integrity of cdx indexes, are the two most important issues at the moment in my opinion. I am sure other users have other priorities but these two decide for me if I can use X# or not.

Kees.

Still problems with typing performance

Posted: Wed Jul 07, 2021 7:12 pm
by VR
Robert,

the planed changes probably will help alot. But if the implementation takes a while, adding an option to deactivate the automatic showing of intellisense and parameter info could be an "easy workaround" for the meantime. That way, the user could decide, when he/she wants to activate intellisense (ctrl + space) or parameter info (ctrl + shift + space).

Volkmar

Still problems with typing performance

Posted: Wed Jul 07, 2021 8:11 pm
by robert
Volkmar,
That is a good idea.. I'll implement that as well.

Robert

Still problems with typing performance

Posted: Wed Jul 07, 2021 10:16 pm
by ic2
Hello Robert,
robert wrote:Volkmar,
That is a good idea.. I'll implement that as well.
What different is that from disabling Show completion list after a char is typed"?

I would very strongly suggest to implement something which limits the delay without disabling Intellisense instead. I think, if the async solution can't be implemented quickly, maybe Kees's suggestion to select the categories to fill can be implemented instead? I can imagine a long list of suggestions contains a lot of irrelevant suggestions too.

I think this should really get priority now. I would say the highest, above any other addition, VS 2022 integration etc. If I look back I can find for X# 1.1.2 on 5 February 2018:
Some users experienced slowness in the editor. This build attempts to fix that.

It has been a problem for too long.

Dick

Still problems with typing performance

Posted: Thu Jul 08, 2021 6:36 am
by robert
Dick,
We have heard you.
This will be priority #1 for the next build.

Robert

Still problems with typing performance

Posted: Thu Jul 08, 2021 6:59 am
by wriedmann
Hi Robert,
and please add the DBFCDX RDD as priority #2.
It is important for VOers and VFPers.
Wolfgang