problem with the source code editor in VS

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

problem with the source code editor in VS

Post by Juraj »

Hi All

I have problem with the source code editor in VS Community 2017 Version 15.5.2 and XS Versopm 1.1.1.0.
Error occurs most often after typing "SELF:". After writing a colon, IntelliSense does not appear but freezes Visual Studio.
I need to terminate Visual Studio through the task manager.

Juraj
User avatar
Chris
Posts: 4599
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

problem with the source code editor in VS

Post by Chris »

Hi Juarj,

Sorry about that. Please give us as more info as possible in order to try to reproduce that problem, or to understand under what circumstances it happens.

Does it happen when typing SELF: inside a specific class, or does it happen in many?
Is it code inside a method, constructor, property or it does not matter?
Does it happen only after a long time writing code, or can it happen also just after you open VS?
Can you zip and send a solution that shows this problem from time to time?

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

problem with the source code editor in VS

Post by Juraj »

Hi Chris

the error appears only in the WPF app, in WinForm, and is OK. I'm attaching a test WPF app. I want to write to Method Window_Loaded two line:

PRIVATE METHOD Window_Loaded(sender AS OBJECT, e AS System.Windows.RoutedEventArgs) AS VOID
LOCAL cName:="" AS STRING

//****** First line
SELF:TLabel:Content:="Test 1"
// ***** I want to write SELF:VarName:Text:="" but when I write "SELF:" I will freeze


Juraj
TestVSErrror.zip
(31.18 KiB) Downloaded 42 times
User avatar
Chris
Posts: 4599
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

problem with the source code editor in VS

Post by Chris »

Hi Juraj,

Thanks for the sample, but unfortunately I can't reproduce the problem, seems it's always working here. Does it always happen for you, or only from time to time? What about if you type cName: in the same line, this always works ok? What about "SUPER:"?

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

problem with the source code editor in VS

Post by Phil Hepburn »

Hi Chris,

I am afraid to say that on my WPF projects and 1.1.1.0 compiler version there is often a definite time 'lag' or delay. I only just noticed it yesterday as I went back to an earlier Project in the same Solution I was working on.

For me it is nothing like as bad as with the previous version, it is workable, but would be annoying to many others I suspect.

I will try and find when it is worse for me - but as you know, it is not easy to pin these things down in a multi tasking environment.

Sorry to have to give the news ;-0((

Regards,
Phil.
User avatar
Chris
Posts: 4599
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

problem with the source code editor in VS

Post by Chris »

Hi Phil,

No prob about the bad news, we want people telling us about any issues they have, so we can fix them or provide a solution.

Regarding speed issues, actually we have made some important steps in the last 2 builds to increase the performance in the VS editor, so it should actually be faster than before (it certainly is a lot faster on my machine). But the extra speed does come in the expense of using more memory, sometimes a lot of memory. So in case all the system's memory is used, then the OS can kick in and start swapping memory back and forth to the disk, and if that starts happening, then there will be a big slowdown. The exact same applies to the compiler as well.

Could it be that this is happening when you experience the slowdowns? Maybe you have a lot of programs open at the same time each requiring enough memory and sometimes there's just not more free available? Please check the task manager when the slowdown occurs, how much % free memory does it report? Also what about the CPU usage?

It's without saying that even if this is what turns out to be the problem, we still need to try and improve it, by reducing the memory usage of x#, but in any case it will be a very good first step diagnosing the cause of the slowdown you are experiencing..

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

problem with the source code editor in VS

Post by Phil Hepburn »

Hi Chris,

I understand what you are saying, and will do all I can to help out.

After posting my last post to you I did some experimenting and had the code editor freeze / lock on me twice for a 5 second period. A bit later, while doing more tests it was 9 seconds. But not easily reproducible :angry:

However, this pattern may fit the resource usage of CPU and Memory I suppose.

I will try some further testing tomorrow when I will close down everything else other than VS and X# as well as Help & Manual. I always have that open in order to make the eNotes.

Out of interest to you and others I saw the other day that Edge the Microsoft Browser takes up a BIG chuck of resources, even when it is minimised - but with a few tabs open. May be 10 to 30% CPU at times. And over 4 Gigs RAM ?

Only one problem I can see by hunting down resource hungry stuff etc., is that I do have a very high spec machine - or it was. So really we shouldn't see an issue unless I go crazy with the apps open.

here is my PC spec for your information :-
ChrisResources_01.jpg
ChrisResources_01.jpg (24.8 KiB) Viewed 392 times
I fancy closing Edge may have the biggest / best effect.

Cheers for now,
Phil.
Wales, UK.
User avatar
Chris
Posts: 4599
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

problem with the source code editor in VS

Post by Chris »

Hi Phil,

Next time you encounter a slowdown, please check the process manager, how much available % memory does it report? Also what's the CPU load of he devenv.exe process?

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
FFF
Posts: 1535
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

problem with the source code editor in VS

Post by FFF »

Phil, Chris,
pmfji, but just in case: it may be no problem with X# at all. For quite some time i hear folks complain, that the OS (possibly Defender) swallows system resources when it sees fit, making for some quite annoying hickups in user experience.
Just a thought...

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

problem with the source code editor in VS

Post by Phil Hepburn »

Hi Karl,

yes, you are right .....

when I run Defender at the start of the day, and Malwarebytes as well - I can see 100% CPU usage in the Task Explorer and I am doing no other personal apps at the time.

I will have a good look in the morning. I have already cleared down my Edge browser and closed all windows and tabs except the X# info one.

Fingers crossed,
Phil.
Wales, UK.
Post Reply