From 707142007b7dd2113bd08de0b628cf1693c5b566 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 11 Oct 2023 22:56:22 +0000 Subject: [PATCH] Microoptimize package name extraction. Since there's only one, and it appears early, we can stop when we find it rather than trawl through megabytes of localized strings we don't need to see. Bug: https://github.com/onetrueawk/awk/issues/199#issuecomment-1756885708 Test: treehugger Change-Id: If4d7c63da7df76c23fca417a4b727189f79e3ce6 --- core/definitions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/definitions.mk b/core/definitions.mk index b6b0d69ed2..ebc6c6e5a3 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2955,7 +2955,7 @@ endef ifeq ($(HOST_OS),linux) # Runs appcompat and store logs in $(PRODUCT_OUT)/appcompat define extract-package -$(AAPT2) dump resources $@ | awk -F ' |=' '/^Package/{print $$3}' >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log && +$(AAPT2) dump resources $@ | awk -F ' |=' '/^Package/{print $$3; exit}' >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log && endef define appcompat-header $(hide) \