Still problems with typing performance

We encourage new members to introduce themselves here. Get to know one another and share your interests.
User avatar
Kees Bouw
Posts: 97
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Still problems with typing performance

Post 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."
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Still problems with typing performance

Post by Chris »

Kees, is that with the option "Show completion list after a char is typed" enabled or disabled?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Still problems with typing performance

Post 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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Still problems with typing performance

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Kees Bouw
Posts: 97
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Still problems with typing performance

Post 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.
VR
Posts: 98
Joined: Sun Aug 23, 2020 3:07 pm
Location: Italy

Still problems with typing performance

Post 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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Still problems with typing performance

Post by robert »

Volkmar,
That is a good idea.. I'll implement that as well.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Still problems with typing performance

Post 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
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Still problems with typing performance

Post by robert »

Dick,
We have heard you.
This will be priority #1 for the next build.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Still problems with typing performance

Post by wriedmann »

Hi Robert,
and please add the DBFCDX RDD as priority #2.
It is important for VOers and VFPers.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply