Skip to content

Ensure that only the tokens needed are fetched - #3722

Merged
parrt merged 1 commit into
antlr:devfrom
TristonianJones:token-stream-optimization
May 27, 2022
Merged

parrt merged 1 commit into
antlr:devfrom
TristonianJones:token-stream-optimization

Conversation

@TristonianJones

Copy link
Copy Markdown
Contributor

Update the Go and Java runtimes to match the C++ runtime for syncing to only the tokens needed
to read the text from the supplied interval.

The fill() methods search for EOF as a signal to conclude the token syncing; however, when there
is an errant input, EOF may be missing and this can result in fill() re-reading the entire token stream
for each error encountered in the input. As such fill() has been replaced with sync() calls which
provide equivalent functionality.

Signed-off-by: Tristan Swadell tswadell@google.com

Signed-off-by: Tristan Swadell <tswadell@google.com>
@jcking
jcking requested a review from parrt May 18, 2022 19:48
Comment thread runtime/Go/antlr/common_token_stream.go Resolved
@parrt

parrt commented May 20, 2022

Copy link
Copy Markdown
Member

Seems harmless enough and if it's mimicking C++ seems OK. Is the continuous integration system down @ericvergnaud ?

@KvanTTT

KvanTTT commented May 27, 2022 •

Copy link
Copy Markdown
Member

There are some problems with self-hosted CI again on not Windows platforms.

@parrt

parrt commented May 27, 2022

Copy link
Copy Markdown
Member

@ericvergnaud can you kick the CI? Seems like github actions, at least self hosted, are unreliable. I guess that means that if we bought some fancy server in the cloud it we have the same problem right?

@KvanTTT

KvanTTT commented May 27, 2022 •

Copy link
Copy Markdown
Member

They are already fine at least here: #3725. Is it possible just to restart the build?

@KvanTTT

KvanTTT commented May 27, 2022 •

Copy link
Copy Markdown
Member

I guess that means that if we bought some fancy server in the cloud it we have the same problem right?

Yes, I guess it's more reliable and preferable option.

@parrt

parrt commented May 27, 2022

Copy link
Copy Markdown
Member

I restarted failed jobs.

@parrt

parrt commented May 27, 2022

Copy link
Copy Markdown
Member

oh and now it says all fine. that was fast. maybe too fast. haha

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.

4 participants