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
robert
Posts: 4520
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,
Can you check Tools/Options TextEditor/X#/Formatting.
Is the option "Trim Trailing Whitespace" checked ?

Or does your solution have a file .EditorConfig
If so, is the option "trim_trailing_whitespace" set to true for .prg files?

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,
robert post=26538 userid=253 wrote: Can you check Tools/Options TextEditor/X#/Formatting.
Is the option "Trim Trailing Whitespace" checked ?
Formatting:
Screenshot1.png
Screenshot1.png (9.52 KiB) Viewed 756 times
Intellisense:
Screenshot2.png
Screenshot2.png (14.67 KiB) Viewed 756 times
Options:
Screenshot3.png
Screenshot3.png (12.15 KiB) Viewed 756 times
Settings Competition:
Screenshot4.png
Screenshot4.png (21.86 KiB) Viewed 756 times
Best regards,
Leonid
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,
The problem has become even more complex. In previous posts, I described a situation where a tab closes for several minutes. But in the end, it closes and the editor continues to work. But now I found that in some cases the editor freezes forever.
To demonstrate the problem, I recorded a short video:
ScreenRecorderProject1.zip
(9.16 MiB) Downloaded 99 times
This video opens a large PRG (more than 5000 lines). At first everything works fine (I move the mouse over the lines and hints are displayed). Then I hover over line 1500 and the editor freezes forever.

I note that the problems described in this topic were not observed in version 2.14 and earlier (which is also confirmed by my colleagues). This something happened in version 2.15 or 2.16 (version 2.15 I missed). As you can see from the video, the problem is very serious. Some files are essentially uneditable.
Best regards,
Leonid
User avatar
robert
Posts: 4520
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,
I am sorry to hear this.
Can you try the following:

- Close VS
- Open regedit
- Goto the key HKEY_CURRENT_USERSOFTWAREXSharpBVXSharp
- Add the (DWORD) entry Log2File wih a value of 1 (if it does not exist)
- restart VS
- edit the file where you see the problems
- close VS after you have seen the problems

This enables logging inside the XSharp subsystem inside VS
This will slow down VS a bit, but may help to resolve the problem.

Goto the folder

Code: Select all

c:Users<yourname>AppDataLocalTempXSharp.Intellisense 
Zip the Project*.log file(s) and send these to me.

After that, you may want to remove the registry key or set its value to 0
You can also log to the windows debugger with the "Log2Debug" entry.


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,
Sent the file to your email.
Best regards,
Leonid
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 »

I'll just leave this here so I don't forget:
The problem manifests itself when the "Highlight identifiers" parameter is enabled. If this option is turned off, the problem is not observed (the tab closes quickly).
Best regards,
Leonid
User avatar
robert
Posts: 4520
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,
Thanks for that info. I will see if I can find it with that background info

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,
Please let me know if there is any progress on the issues of VS hang and tabs closing for a long time (especially hang)? For the last few days I have been actively working with a large solution in version 2.16.0.5 and it hang very often. I have to restart VS dozens of times a day. And some PRGs can only be edited in a another text editor.
You previously gave a fix in version 2.16.0.6, but the debugger broke in it, so I had to revert to 2.16.0.5. Maybe you can share the release date for the next 2.17 version?
Best regards,
Leonid
User avatar
Chris
Posts: 4907
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,

Just to be clear, do you mean that the 0.6 patch had completely fixed the hang problem?
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,
Yes, in version 0.6 the hang has been fixed. In the cover letter, Robert said that the problem was indeed found in the preprocessor. I checked and the problem was indeed fixed. Unfortunately, the debugger broke in this version (it stopped working altogether). Therefore, I had to abandon this version.

To be clear, there are two problems in total:
1. Full hang of VS on some PRGs (somehow related to the preprocessor).
2. Long closing of tabs after editing large PRGs. I described this problem above at the beginning of this topic. I managed to find out that this problem is somehow related to the "Hightlight Identifiers" option. If this option is disabled, the problem is not observed.
Best regards,
Leonid
Post Reply