Ubuntu 24.10 (Oracular Oriole) has reached end of life, so this bug will
not be fixed for that specific release.

** Changed in: ubuntu-drivers-common (Ubuntu Oracular)
       Status: Fix Committed => Won't Fix

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ubuntu-drivers-common in Ubuntu.
https://bugs.launchpad.net/bugs/2092601

Title:
  ubuntu-drivers list  - Extremely slow

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Oracular:
  Won't Fix
Status in ubuntu-drivers-common source package in Plucky:
  Fix Released

Bug description:
  [Impact]
  Some basic operations on ubuntu-drivers are extremely slow (> 1mn) and 
CPU-intensive, to the point that users might think it broken.

  Examples of such operations are
  ubuntu-drivers list
  ubuntu-drivers list-oem

  Both of those operations are used in subiquity. While the performance
  hit there might not be too noticeable due to parallelism with other
  steps of the install, it's still fairly bad.

  And of course users of both the ubuntu-drivers CLI and the software-
  properties panel GUI feel the impact in full.

  
  [Expected result]
  ubuntu-drivers takes seconds to run, not minutes.

  
  [Steps to reproduce]
  1. Run 'time ubuntu-drivers list' several times
  2. observe the time

  
  [Proposed fix]

  https://github.com/canonical/ubuntu-drivers-common/pull/116

  There is an issue when trying to compute a stable key to cache the
  results of a costly computation (modalias mapping), resulting in a
  write-only cache.

  The fix is to remove the cache entirely, expose the computation method
  as a new public API, and let the caller optionally provide the
  previously cached value.

  
  [Test plan]
  1. Run 'time ubuntu-drivers list' several times
  the test should take mere seconds instead of tens of seconds or even minutes


  [Where problems could occur]
  Regression risks are minimal: for all the use cases listed above, the call 
sites are within ubuntu-drivers-common and have been inspected for correctness 
of hoisting the modalias mapping out of the loop. Any other caller of the 
changed API doesn't need to be changed as the new argument is optional. The 
removal of the cache is essentially a NOP since cached values weren't retrieved 
anyway due to the original bug.



  
  [Original report]
  Looking for drivers is extremely slow.
  Verified to exist on multiple systems.

  ----------------
  $ time ubuntu-drivers list
  nvidia-driver-560-open, (kernel modules provided by 
linux-modules-nvidia-560-open-generic-hwe-24.04)
  nvidia-driver-560, (kernel modules provided by 
linux-modules-nvidia-560-generic-hwe-24.04)

  real  1m48.680s
  user  0m26.984s
  sys   1m21.665s
  ----------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/2092601/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to