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

Slow buggy formatting on BIG code import lines #370

Open
KRN-8 opened this issue Jun 21, 2023 · 3 comments
Open

Slow buggy formatting on BIG code import lines #370

KRN-8 opened this issue Jun 21, 2023 · 3 comments
Assignees
Labels
bug something isn't working syntax highlighter syntax highlighter (code coloring) issues

Comments

@KRN-8
Copy link

KRN-8 commented Jun 21, 2023

Description / Story?

For intelliSense to work, the used files functions have to be parsed.
Soo i have the "libraries" open in extra tab, and when i reopen VSCode i click on each of them and let them colorize.

One of them :
https://github.com/Spawnova/ShinsImageScanClass/blob/main/ShinsImageScanClass.ahk
has a LOT of LONG lines, which to my understanding, they import C++ code. They are essentially function calls with 1 OMEGA LARGE String passed in. They start around line 60 and the longest one is close to 5 000 chars long !

And those LONG lines all together take up to 20 seconds to Finish.
And the results are not all the same, even tho all the lines (apart from the names and strings) are the same

My best Guess

The parser gets stuck on the '+' characters trying to do math inside of a string.
Which somehow messes with both speed and colorization.

Actual output

obrazek

Additional context

im using V1, the linked script is also in V1
also checked: I dont have any other AHK related Extension in my VSCode

@KRN-8 KRN-8 added bug something isn't working formatter code formatter issues labels Jun 21, 2023
@mark-wiemer
Copy link
Member

Thank you for reporting this. I'm not surprised to see this behavior, there isn't extensive optimization done to handle edge cases of many lines like this these. I'll see what I can do.

@mark-wiemer mark-wiemer added syntax highlighter syntax highlighter (code coloring) issues and removed formatter code formatter issues labels Jun 21, 2023
@mark-wiemer mark-wiemer moved this to Todo in AHK++ Jun 21, 2023
@KRN-8
Copy link
Author

KRN-8 commented Jul 22, 2023

yo, can we get an ETA for this please ?
im fine with a dirty workaround too, sth like if function followed by '(' read the rest as string untill ")[return|EOF]" or whatever :-)

@mark-wiemer
Copy link
Member

Don't expect anything soon :/ a change here might be pretty difficult and I'm focusing on some other QoL stuff and AHK v2 support currently :( I'll be updating the https://github.com/orgs/mark-wiemer-org/projects/1 project soon to give a better visual of how issues are prioritized. You're welcome to research online and post any findings here, or even open a PR yourself :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working syntax highlighter syntax highlighter (code coloring) issues
Projects
Status: Todo
Development

No branches or pull requests

2 participants