Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] option for manual compilation instead of on-change compilation #145

Open
gdeOo opened this issue Mar 10, 2020 · 2 comments

Comments

@gdeOo
Copy link
Contributor

gdeOo commented Mar 10, 2020

When scripts start getting a bit large, or when some individual triggers are large, the automatic compilation performed by RATools when the script changes starts to become a nuisance, blocking the UI for a very noticeable interval of time.

Another situation I've run into is bugs that result in exception-related message boxes being hard to fix, because changes to the script that dont remove the bug-triggering code result in the message box showing up again. I usually end up copying the code into another editor to fix it before copying it back into RATools.

I'd prefer having the option to compile the script manually, preferably with an associated keyboard shortcut.

@Jamiras
Copy link
Owner

Jamiras commented Mar 11, 2020

Eliminating the compilation will only cut the processing time in half (at best). Parsing (of the entire document) is performed for the syntax highlighting after every modification as well.

It would be hugely beneficial to only re-parse/re-highlight/re-compile the parts of the code around where the modifications occur, but determining what may or may not depend on any particular piece of code is not an easy task.

This logic is supposed to be occurring on a background thread, and can be interrupted if more modifications occur while it is occurring. When it completes, it raises PropertyChanged events to notify the UI to update via WPF databinding. I'm curious where the "blocking of the UI" is actually happening.

I'm fine with the idea of making compiling (and therefore error reporting) a manual process, but I don't know that it will have as much of an impact as you would expect due to the current syntax highlighting implementation.

@MagmarFire
Copy link
Contributor

MagmarFire commented May 30, 2020

It would be hugely beneficial to only re-parse/re-highlight/re-compile the parts of the code around where the modifications occur, but determining what may or may not depend on any particular piece of code is not an easy task.

Would this potentially be worked around by supporting a project structure where scripts are split between multiple, smaller files, a la Visual Studio? That way, reparsing would only ever have to be done within files that had actually changed. There'd be no need to calculate what parts of the code within a file had changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants