Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Jan 4, 2022

SQL is now tokenized before parsing. Tokens are preserved for second parse if SQL contains an error. Tokens are also stored in prepared commands for re-use if their recompilation is needed. Forward scans now can simply iterate over already known tokens.

Handling of supplementary Unicode characters in identifiers and whitespace is improved.

In long tests with looped TestScript performance on Java 8 is improved by about 1.2–1.5% on warm JVM. Because this test doesn't use recompilation actively, most of its commands don't produce errors, and it contains only few commands where complex forward scans are required I hope we shouldn't have performance degradation caused by these complications with tokens.

I think both Parser and Tokenizer can be improved in the future, but changes in them should be carefully tested, because actual performance impact may be very surprising.

@katzyn katzyn merged commit 13334c2 into h2database:master Jan 5, 2022
@katzyn katzyn deleted the tokenizer branch January 5, 2022 08:12
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

Successfully merging this pull request may close these issues.

1 participant