diff mbox series

buildhistory: Drop git-gc call as obsolete

Message ID 20241202232130.33442-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series buildhistory: Drop git-gc call as obsolete | expand

Commit Message

Richard Purdie Dec. 2, 2024, 11:21 p.m. UTC
buildhistory used to result in many individual objects in the repo which
could affect performance. This gc call was added over a decade ago to avoid
those performance issues. Modern git calls git-gc when needed and this kind
of workaround should no longer be needed.

There is a small chance this is contributing to problems with the autobuilder
buildhistory repositories, so simplifying the code may help that too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/buildhistory.bbclass | 1 -
 1 file changed, 1 deletion(-)

Comments

Khem Raj Dec. 2, 2024, 11:54 p.m. UTC | #1
On Mon, Dec 2, 2024 at 3:21 PM Richard Purdie via
lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>
> buildhistory used to result in many individual objects in the repo which
> could affect performance. This gc call was added over a decade ago to avoid
> those performance issues. Modern git calls git-gc when needed and this kind
> of workaround should no longer be needed.
>
> There is a small chance this is contributing to problems with the autobuilder
> buildhistory repositories, so simplifying the code may help that too.
>

I do run into situations on git repos often that requires running git
gc to fix them but I think
repo optimization should be left to user on those grounds I agree to remove it.

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/buildhistory.bbclass | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index ce3abaa69d4..d735dd5fb5d 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -877,7 +877,6 @@ END
>                         # Porcelain output looks like "?? packages/foo/bar"
>                         # Ensure we commit metadata-revs with the first commit
>                         buildhistory_single_commit "$CMDLINE" "$HOSTNAME" dummy
> -                       git gc --auto --quiet
>                 else
>                         buildhistory_single_commit "$CMDLINE" "$HOSTNAME"
>                 fi
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#208162): https://lists.openembedded.org/g/openembedded-core/message/208162
> Mute This Topic: https://lists.openembedded.org/mt/109891145/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index ce3abaa69d4..d735dd5fb5d 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -877,7 +877,6 @@  END
 			# Porcelain output looks like "?? packages/foo/bar"
 			# Ensure we commit metadata-revs with the first commit
 			buildhistory_single_commit "$CMDLINE" "$HOSTNAME" dummy
-			git gc --auto --quiet
 		else
 			buildhistory_single_commit "$CMDLINE" "$HOSTNAME"
 		fi