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

Performance enhancements #97

Open
3 of 5 tasks
sgammon opened this issue Nov 30, 2022 · 0 comments
Open
3 of 5 tasks

Performance enhancements #97

sgammon opened this issue Nov 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sgammon
Copy link
Member

sgammon commented Nov 30, 2022

The following performance enhancements are imagined or planned (modulo testing to validate):

  • Concurrent JS execution. Currently, the JS VM operates in a single thread. We should make it multi-threaded with proper synchronization a-la this sample. Done right, this could easily double/triple JS execution throughput.

  • PGO (Profile Guided Optimization). PGO can close the gap between native binary peak performance and JVM warmed-JIT peak performance. Ideally this could be rolled into the Gradle plugin based on an app's testsuite (along with agent instrumentation for reflection). Oracle reports this as the most impactful performance option for GraalVM native apps.

  • Hermetic inputs. By fully understanding inputs to SSR executions, and controlling the surrounding environment, it may be possible to do intelligent things with caching and streaming.

  • Streamed responses. Currently, HTML content is buffered before being sent to the invoking client; this is particularly true of the JS VM. If responses were fully streamed, the browser would receive resources earlier, and would therefore be able to begin downloading resources earlier, improving perceived performance. This would also lay the ground-work for techniques like those adopted by Turbo (i.e. WebSocket-based streaming of HTML).

  • Fully-static images. By creating smaller Docker images which function in a completely standalone fashion (i.e. FROM scratch), maybe the resulting apps use less memory and are therefore lighter/faster at runtime. Remains to be seen.

@sgammon sgammon added the enhancement New feature or request label Nov 30, 2022
@sgammon sgammon added this to the Release R2: Alpha 2 milestone Nov 30, 2022
@sgammon sgammon modified the milestones: Release R2: Alpha 2, Future Jan 13, 2023
@sgammon sgammon modified the milestones: Future, Release R4: Beta 1 Sep 19, 2023
@sgammon sgammon removed this from the Release R4: Alpha 8 milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant