[Bug 258863] "freebsd-update fetch" unnecessary IO when no updates [Fix provided]

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 02 Oct 2021 10:12:33 UTC

            Bug ID: 258863
           Summary: "freebsd-update fetch" unnecessary IO when no updates
                    [Fix provided]
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: tux2bsd@protonmail.com

The IO trashing has likely been present in all versions of freebsd-update.  I
have a full description and code submitted the improvement against CURRENT


Copy of the description:

When there are no updates available there is no need run through the the
entirety of fetch_run ()

This introduces a simple check and its most significant benefit is avoiding the
disk intensive phase of "fetch" (i.e. Inspecting system...) as there were no
updates anyway.

On IO bound hardware, in my case a Raspberry Pi 3, this improvement has reduced
runtime duration of freebsd-update fetch from 1m20s down to 1.5s.

Even on fast SSD hardware freebsd-update fetch currently takes ~15 seconds,
this changes reduces the time to sub second.

Again for emphasis: This is for the case when there are no updates. Check early
and if the version matches, its done.

I trust the github pull request has everything required, if not please let me

You are receiving this mail because:
You are the assignee for the bug.