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

Script Options parser performance tests single line #982

Closed
tomuben opened this issue Oct 15, 2024 · 2 comments · Fixed by #987
Closed

Script Options parser performance tests single line #982

tomuben opened this issue Oct 15, 2024 · 2 comments · Fixed by #987
Assignees
Labels
refactoring Code improvement without behavior change

Comments

@tomuben
Copy link
Collaborator

tomuben commented Oct 15, 2024

Background

There are performance tests to compare the CTPG and legacy parser for a large number of lines, see
https://github.com/exasol/script-languages/blob/master/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc

We also should extend the test to create a dummy UDF with a huge single line, in order to compare performance between the CTPG based parser and legacy parser.

Acceptance Criteria

New test in https://github.com/exasol/script-languages/blob/master/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc with a huge single line UDF + results.

@tomuben
Copy link
Collaborator Author

tomuben commented Oct 16, 2024

Setup

a UDF with a single line with ca 50 Million words:

%jvmoption option1=abc;%jvmoption option2=def;class JVMOPTION_TEST_WITH_SPACE {static void run(ExaMetadata exa, ExaIterator ctx) throws Exception {somecode somecode <50 Mio repetions> }}

Result

Tests were executed with --config optimize

Ctpg based implementation

bazel test --config optimize //base/javacontainer/test:javacontainer-perf-test-ctpg-parser
...
//base/javacontainer/test:javacontainer-perf-test-ctpg-parser            PASSED in 5.6s

Legacy implementation

bazel test --config optimize //base/javacontainer/test:javacontainer-perf-test-legacy-parser
//base/javacontainer/test:javacontainer-perf-test-legacy-parser          PASSED in 2.3s

Summary

Ctpg based implementation takes ca 2.5x as long as legacy implementation

@tomuben
Copy link
Collaborator Author

tomuben commented Oct 16, 2024

For same test with only 5 Mio words both implementations take ca. 0.1s

tomuben added a commit to exasol/script-languages that referenced this issue Oct 17, 2024
tomuben added a commit that referenced this issue Oct 21, 2024
1. #982: Added a performance test for ScriptOptions parser for a single line UDF
2. #983: Refactor CTPG script options Java parser code
tomuben added a commit that referenced this issue Oct 21, 2024
1. #982: Added a performance test for ScriptOptions parser for a single line UDF
2. #983: Refactor CTPG script options Java parser code
@tomuben tomuben linked a pull request Oct 21, 2024 that will close this issue
10 tasks
tomuben added a commit that referenced this issue Oct 21, 2024
closes  #982 - Added a performance test for ScriptOptions parser for a single line UDF
closes  #983 - Refactor CTPG script options Java parser code
@tomuben tomuben closed this as completed Oct 21, 2024
tomuben added a commit that referenced this issue Nov 5, 2024
Changelist:
- #969: Use new CTPG parser in java vm (#970) 
- #980: Moved flavor template-Exasol-all-java-17 to script-languages repo (#984)
- #971: Removed dead code in Java VM (#985) 
- #982 &  #983: Refactorings in ScriptOptions parser (#987) 
- #988: Adapted Java integration tests for new ScriptOptions parser (#995) 
- #997: Added documentation for Rollback of Script-Languages-Container (#999)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code improvement without behavior change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant