update-motd-updates-available wastes 1 second on every login by forking hundreds of /usr/bin/stat

Bug #1200044 reported by Anders Kaseorg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

The /usr/lib/update-notifier/update-motd-updates-available script executed on console logins is painfully slow, taking almost a second to run. Debugging reveals that this is because it forks /usr/bin/stat hundreds of times.

The entire NEED_UPDATE_CHECK logic can be replaced with a single call to find -newer, which speeds up the script by a factor of 20.

Related branches

Changed in update-notifier (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.142

---------------
update-notifier (0.142) saucy; urgency=low

  [ Anders Kaseorg ]
  * update-motd-updates-available: Avoid forking hundreds of /usr/bin/stat
    (LP: #1200044)
 -- Michael Vogt <email address hidden> Mon, 15 Jul 2013 09:12:52 +0200

Changed in update-notifier (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.