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

rm token viewer from the preview panel and don't redraw parse tree for every input character. #551

Merged
merged 7 commits into from
May 13, 2022

Conversation

parrt
Copy link
Member

@parrt parrt commented May 12, 2022

rm token viewer from the preview panel how's it it's not necessary, given Control-hover show is the tokens, and it consumes fast CPU resources when there is a lot of input.

Even for 76k lines of SQL in input panel, seems ok. Parsing in background. Updating tree/hier views is 667ms even in intel rosetta mode (i think it is).

The MergingUpdateQueue allows us to avoid reparsing and also updating the parse tree upon each keystroke. If someone is typing, keep resetting timer so parsing doesn't start.

Signed-off-by: Terence Parr [email protected]

…iven Control-hover show is the tokens, and it consumes fast CPU resources when there is a lot of input.

Signed-off-by: Terence Parr <[email protected]>
@parrt parrt marked this pull request as draft May 12, 2022 00:35
…so kills any previous queue elements.

Much better UI performance now.
Reorg parse start code.

Signed-off-by: Terence Parr <[email protected]>
@bjansen
Copy link
Collaborator

bjansen commented May 12, 2022

Control-hover is easy to miss though, I didn't even know it existed :/

@parrt
Copy link
Member Author

parrt commented May 12, 2022

ha! Yeah I have to do a better job of advertising this. I’m going to make a video tutorial and maybe a quick list of the features as part of the documentation of ANTLR itself! This PR has the token view removed and does the queuing up of typing before creating a parse tree. Much much more responsive and even works with the huge ball of SQL. I still need to put the parsing in the background because it does pause the GUI thread too long

parrt added 3 commits May 13, 2022 11:01
…ntil they stop for a while.

Signed-off-by: Terence Parr <[email protected]>
Signed-off-by: Terence Parr <[email protected]>
@parrt parrt marked this pull request as ready for review May 13, 2022 18:50
@parrt parrt added this to the 1.19 milestone May 13, 2022
parrt added 2 commits May 13, 2022 11:55
Signed-off-by: Terence Parr <[email protected]>
Signed-off-by: Terence Parr <[email protected]>
@parrt parrt merged commit 571a39e into antlr:master May 13, 2022
@parrt parrt deleted the rm-token-view branch May 13, 2022 19:01
@parrt parrt linked an issue May 13, 2022 that may be closed by this pull request
@parrt
Copy link
Member Author

parrt commented May 13, 2022

Fixes #546

@parrt
Copy link
Member Author

parrt commented Oct 11, 2022 via email

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

Successfully merging this pull request may close these issues.

UI freeze after parse on SQL grammars with large inputs
2 participants