Bug 14233

Summary: Improve the time complexity of opkg configure.
Product: [Yocto Project Subprojects] opkg Reporter: abdul karim <hafizabdul_karim>
Component: opkgAssignee: Alex Stewart <alex.stewart>
Status: ACCEPTED --- QA Contact:
Severity: enhancement    
Priority: Undecided CC: alex.stewart
Version: 0.4.2   
Target Milestone: next-patch   
Hardware: Other   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description abdul karim 2021-02-10 19:34:18 UTC
Preconditions:
oe-core branch is dunfell. opkg version is 0.4.2, and the target board is NXP i.MX6ullevk.


Triggering Action/Cause:
Boot us the system, run-postinsts.service will run on the first boot. in this service the command "opkg configure" is run.


Expectation:
opkg configure should complete in less than a second time.

Reality.
opkg configure takes around 8s of time. ! further looked into the opkg source and found that this loop is consuming 8s of time.
https://git.yoctoproject.org/cgit/cgit.cgi/opkg/tree/libopkg/opkg_cmd.c?h=v0.4.2#n358 and is run 938 times.