-
Notifications
You must be signed in to change notification settings - Fork 12
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
Performance regression with graal-based image #54
Comments
Hello @gmile , thank you for opening the PR 4 years ago :-) The GraalVM image was never really production-ready, but rather a field for experimentation and a test case to make sure the library can be used in graal services. Therefore, the performance was not really optimized for that. Also, I just realized that the graal container broke in #140 2 years ago and I just patched it in the last commit :-( However, now I had the chance to pick this issue up and spend some time fixing the service. The current measurements with your approach are the following with th With JVM service:
With GraalVM service:
So it seems like the issue still persists (0.007s vs 0.150s), even though the performance is much better today than it used to be 4 years ago. In the next days, I will check some options:
|
With latest GraalVM EE:
No significant improvement so far. |
I tested PGO with some profiling today and managed to get the runtime down to cca
|
Describe the bug
When using graal docker image introduced in #53, .docx templates are rendered slower.
To Reproduce
download & extract a .docx template file into a
/tmp/templates
directory: lipsum_sample.docx.zipRun two different containers, side by side (in separate Terminal windows):
Run the tests:
for regular container:
$ bash -c "for test in 1 2 3 4 5; do time curl -s localhost:5000/lipsum_sample.docx --header 'content-type: application/json' --data '{}' > /tmp/lipsum_sample_regular.docx; done" real 0m10.385s user 0m0.006s sys 0m0.010s real 0m4.191s user 0m0.005s sys 0m0.008s real 0m4.245s user 0m0.005s sys 0m0.008s real 0m4.239s user 0m0.005s sys 0m0.008s real 0m4.263s user 0m0.004s sys 0m0.008s $
for graal container:
$ bash -c "for test in 1 2 3 4 5; do time curl -s localhost:5001/lipsum_sample.docx --header 'content-type: application/json' --data '{}' > /tmp/lipsum_sample_graal.docx; done" real 0m19.201s user 0m0.005s sys 0m0.008s real 0m12.841s user 0m0.004s sys 0m0.010s real 0m13.111s user 0m0.004s sys 0m0.007s real 0m12.936s user 0m0.004s sys 0m0.008s real 0m13.117s user 0m0.004s sys 0m0.007s $
Notice how graal-based image is consistently slower.
Stop the containers:
Expected behavior
Performance of application in a graal-based image is on par with that of a regular one, or faster.
However, I know very little about GraalVM, as well as the goals to build a graalvm-based image. Perhaps, performance was not among the goals for this image.
Screenshots
No screenshots.
Documents
I've attached a link to the document above. It is a 800+ pages .docx file with no template placeholders in it.
Office versions:
Not applicable as far as I can see.
Environment where template is rendered:
Additional context
No additional context.
The text was updated successfully, but these errors were encountered: