Verified with all versions with running servers.

** Description changed:

  [Impact]
  
   * Detecting X and PulseAudio takes some time when starting every shell even 
when it is unlikely that those servers go away between opening new shells.
   * The fix is reusing cached info when starting new shells.
  
  [ Test Case ]
  
   * Start X server and PulseAudio server on Windows, the host WSL system
   * run:
  
- rm -f $HOME/.config/wslu/integration-cache
+ rm -f $HOME/.cache/wslu/integration
  unset DISPLAY
  unset PULSE_SERVER
- time . /etc/profile.s/wsl-integration.sh
+ time . /etc/profile.d/wsl-integration.sh
  echo $DISPLAY $PULSE_SERVER
- cat $HOME/.config/wslu/integration-cache
- time . /etc/profile.s/wsl-integration.sh
+ cat $HOME/.cache/wslu/integration
+ time . /etc/profile.d/wsl-integration.sh
  
   * Ran all of that again with X server and PulseAudio server turned off
  
  [Regression Potential]
  
   * Wrong implementation of  caching logic may break auto detection or
  cache a wrong result. The test case ensures that auto detection is still
  working and also checks the cache content.

** Attachment added: "wslu-cache-running-servers.png"
   
https://bugs.launchpad.net/ubuntu/+source/wslu/+bug/1855898/+attachment/5313708/+files/wslu-cache-running-servers.png

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1855898

Title:
  Cache results of detecting X and PulseAudio when starting environment

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wslu/+bug/1855898/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to