WLP 6.9.20.7 - Can one disable checks / reformatting in new Editor?
Author: haytac
Creation Date: 7/19/2019 1:26 AM
profile picture

haytac

#1
Hi,

The new editor in 6.9.20.7 is much slower than the previous one.
I have an almost 300,000 line strategy.
Even inserting a new line takes tens of seconds.

Is it possible to leave any type of checking out during edits and leave this task to the compiler?

Thanks
profile picture

Eugene

#2
Hi,

I will pass on your concern to the developer.

Undoubtedly you should have better success using Visual Studio IDE for your very long code. As noted several times since when your strategy was 100K+ lines in size.
profile picture

WLP123

#3
QUOTE:
Is it possible to leave any type of checking out during edits


Adding to this request - the new editor attempts to reformat the code after pasting from another editor. Not only does this create a bit of a lag each time the code is pasted, but the reformat introduces new lines etc. and now the line numbers don't match the original making it harder to troubleshoot subsequent compiler errors.
While formatting code is a good feature, perhaps it can be limited to code when it is typed within the editor itself and not to pasted code? Perhaps this could be a setting that is toggled, in case someone does want it to be formatted on paste too.

(Maybe we can retitle this thread as "change requests for new editor", or let me know if a new thread is needed just for this reformat issue).
profile picture

Eugene

#4
QUOTE:
Adding to this request - the new editor attempts to reformat the code after pasting from another editor.

If you think of it, reformatting may be beneficial for some poorly formatted code. I don't consider this an issue too, rather a preference. But there are more important issues to catch and features to implement than this (if it's real).
profile picture

WLP123

#5
QUOTE:
I don't consider this an issue too, rather a preference

Matter of opinion, of course. Didn't think it was going to make it to the top of your list, but something you could at least "pass on to the developer".

QUOTE:
reformatting may be beneficial for some poorly formatted code

I did say it could be a configurable setting.
profile picture

Eugene

#6
I do not agree on that there's some "reformat" issue. Whatever class or routine I copied and pasted, my experience has been smooth.
profile picture

WLP123

#7
One simple example... the open braces are reformatted to go onto the next line if they are on the same line as the opening statement.

Try pasting this....

CODE:
Please log in to see this code.


I employ this simple method to reduce the overall lines especially when a strategy runs into 1000s of lines. I've seen many other coders do the same. After paste, the editor expands this automatically by 6 lines, just for this default stub.

What's strange is the choice (presumably by the developer) to implement this format overriding, rather than some simple but highly useful features like highlighting matching braces, or the ability to collapse and expand functions etc. which would make the editor actually usable. Again, matter of opinion perhaps. I know these were disabled in the old editor on purpose, but was hoping some of these features would be made possible by the editor redesign.
In fact, (unless something is wrong with my upgrade install)... even the existing keyboard shortcuts seem to have been disabled in the new editor? E.g. Ctrl+E to comment selection. Yes, I know... I probably need a new thread for that. :)

profile picture

Eugene

#8
@WLP123

Even if I paste code with your formatting style employed (a.k.a. "New Lines for braces" disabled), reformatting doesn't happen except for the fragment being copied and pasted. The rest of the code is unaffected. IMHO this is not something to lose sleep at night. ;)

Collapse/expand functions - good point, it's disabled by default but you can turn it on in Editor Options > Advanced > Allow outlining.

Ctrl-E-C/U to comment/uncomment selection work just like in VS.

@ haytac

Unfortunately, the developer says there doesn't appear to be a way to disable syntax checks.
profile picture

WLP123

#9
QUOTE:
reformatting doesn't happen except for the fragment being copied and pasted. The rest of the code is unaffected

I'm pasting the entire code each time from an editor that provides some of the simple features mentioned. So the paste and reformat affects the entire strategy, adds 100s of lines and now the line numbers don't match the original thereby making troubleshooting a mess.

QUOTE:
Collapse/expand functions - good point, it's disabled by default but you can turn it on in Editor Options > Advanced > Allow outlining.

Thanks, this worked. However, Right Click option or Keyboard shortcut to "Collapse All" should also be implemented to use this effectively. Having to collapse each one manually each time is not very useful.

QUOTE:
Ctrl-E-C/U to comment/uncomment selection work just like in VS.

This still doesn't work for me. Ctrl-E does nothing and Ctrl-U brings up the (drag and drop) window for "Fundamental Data".
profile picture

haytac

#10
Eugene wrote:
"Unfortunately, the developer says there doesn't appear to be a way to disable syntax checks."

Ok Eugene,
I am saying uncle.
Where was the description of how to do WL edits via Visual Studio?

Here is my tweak loop
- create tweak snippets of code in Notepad++
- copy and paste to WL editor
- compile
- run

This probably happens aout 20 times a day during evening tweaks.

Do you think VS path can run smoothly and quickly in this scenario.

In any case I will try it.
In the past faster machines and copy and paste worked around slowness but not this time.

I gather it is an economic issue to have a built in Visual Studio or Notepad++ editor in WL.

Notepad++ is C# aware and does minimal checking.
Even just reducing syntax checks to Notepad++ level would speed things up quite a bit.

I wonder if the developer thinks this is possible?

Thanks!
profile picture

Eugene

#11
@WLP123

QUOTE:
This still doesn't work for me. Ctrl-E does nothing and Ctrl-U brings up the (drag and drop) window for "Fundamental Data".

There's never been no Ctrl-E shortcut. As per the Wealth-Lab User Guide (Help menu) > Reference > Keyboard > Editor Shortcuts, it's Ctrl-E,C. It works like this: press Ctrl-E, release them, then type C (or U) while selection is active.

QUOTE:
I'm pasting the entire code each time from an editor that provides some of the simple features mentioned.

If you don't like Alternet Editor's behavior you can always use Visual Studio to troubleshoot your strategy. Suggestion also applies to topic starter's 300,000 line strategy.

QUOTE:
However, Right Click option or Keyboard shortcut to "Collapse All" should also be implemented to use this effectively.

Passed your request on to the developer. He finds it useful but first let's see if the Editor component supports it.

@haytac
QUOTE:
Where was the description of how to do WL edits via Visual Studio?


In the Wealth-Lab Wiki where it's been for about a decade now:

Programming | How can I debug my trading strategies in Wealth-Lab?

The article above by Dion Kurczek, the Wealth-Lab author, got later extended by yours truly with a section called "Edit and Continue" (E&C). Once you're up to speed with the main part of the article, check out E&C. If you haven't used E&C before you might be surprised.

I also use Notepad++ daily for different tasks and highly rate its extensibility. Still for me it makes no sense to copy/paste tweaks when VS has E&C. Utilize the power of VS and do your edits to the executing Strategy code on-the-fly without copy/paste.

Note: the forum already has several conversations for employing Visual Studio IDE with WL. I think we should not continue discussing it in this particular thread which focuses on the new Editor's syntax checks. Offtopic will be deleted.
profile picture

WLP123

#12
QUOTE:
If you don't like Alternet Editor's behavior you can always use Visual Studio to troubleshoot your strategy.

Already know this. Not convenient to maintain 2 tools/environments when 1 should suffice.

Point is there should be every effort made to NOT break what little is already working for your customers. So far I've only seen complaints on here about the new release and no new features that someone is ecstatic about.
profile picture

Eugene

#13
The new release is a maintenance one which aims at fixing some long-standing issues for Fidelity data and trading. The Editor upgrade is neither a new feature: it's nothing but a by-product which for some solid reason has become a prerequisite for the release.
profile picture

superticker

#14
QUOTE:
If you don't like Alternet Editor's behavior you can always use Visual Studio to troubleshoot your strategy.

QUOTE:
.... Not convenient to maintain 2 tools/environments when 1 should suffice.

As an engineering professional who uses about 5 editors and 3 IDEs, I would have to disagree. But, yes, I do have my favorites. One of the advantages of the more powerful editors is that they support refactoring of the code and code generation, and the VS IDE editor is one of those. Now you're going to say that's over the top for the non-professional--and I would agree. However, if you're managing large projects with many lines of code, then you are a professional and those professional formatting tools and code generation features provide time saving and formatting consistency for your "pre-processing" tools.

But if you're managing a few thousand lines of code and small projects, then the professional tools are an overkill. I would agree there.

For WL, the bulk of my code, which doesn't change much, is in DLL libraries managed by the VS IDE. In contrast, the strategy code, which is a few hundred lines that often changes, is managed by WL's toy editor. This way I strike the best compromise between a full featured editor (VS) and a toy editor (WL). Finding that compromise is key to your productivity.
profile picture

WLP123

#15
QUOTE:
Finding that compromise is key to your productivity

It is that compromise for me that prompted my post in the first place. Good that you came to that conclusion on your own like an "engineering professional" might be expected to. Every customer is allowed to have their own use cases and methodology in using the tool. Let's be respectful of that.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).