On Thu, 15 Feb 2024 01:59:48 GMT, Phil Race <[email protected]> wrote:

>> src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java line 286:
>> 
>>> 284:         try {
>>> 285:             Process process =
>>> 286:                 new ProcessBuilder("/usr/bin/gnome-shell", "--version")
>> 
>> How it will affect performance?
>
> Well, clearly the exec will take some non-zero time, but this part of 
> initialising the SystemTray only happens once and (arm-waving alert) 99% of 
> apps don't do it at all, so I don't see it as a major problem and it needs to 
> be done.
> There's a plan to re-do it with an API call later but that is more complex 
> code than we have time for now, so it will be fine as a temporary solution.

According to my tests, the call to `getGnomeShellMajorVersion()` took about 
25-35 ms on average, but it is a one-time task.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17860#discussion_r1490283250

Reply via email to