On Tue, 18 Nov 2025 11:27:30 GMT, Renjith Kannath Pariyangad <[email protected]> wrote:
> Hi Reviewers, > > Observed these two demon threads are created on class initializing time due > to static variable and static block call. Observed > [ScreencastHelper.isAvailable()](https://github.com/openjdk/jdk/blob/28d94d6ab4994b844af98c5c227b40b5fb8a72e5/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java#L1527) > from XToolkit.java call is enough to start these demon threads on latest > Linux (Gnome version 47 and above). In my observation some simple workflows > not passing through the code where these **Watchers** are required, at the > same time threads are running because of the above reason. So moving those > into lazy loading will improve loading time and performance. > > Please review and let me know your suggestions. > > Renjith. This pull request has now been integrated. Changeset: 0b3df489 Author: Renjith Kannath Pariyangad <[email protected]> Committer: Alexander Zvegintsev <[email protected]> URL: https://git.openjdk.org/jdk/commit/0b3df489e9d3b6d876a67793e082b930c17ade3e Stats: 32 lines in 2 files changed: 25 ins; 6 del; 1 mod 8372048: Performance improvement on Linux remote desktop Reviewed-by: azvegint, serb ------------- PR: https://git.openjdk.org/jdk/pull/28369
