libopkg: implement lightweight package listing logic
authorJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 20:19:39 +0000 (22:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 20:24:19 +0000 (22:24 +0200)
commitf2166a89b7e96e2c60002959731eebc5f45fa318
tree76cb8060fef8ee6cbca0dc2fd99336f1c6eadf85
parentcf4554d6f26c8973916f83c1720aa2fba55c1baa
libopkg: implement lightweight package listing logic

Instead of building a complete package dependency tree internally, use a
lightweight list data structure to gather and sort package names, version and
descriptions.

This reduced the "opkg list" memory footprint on x86/64 from ~8MB to ~1.5MB.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/opkg_cmd.c
src/opkg-cl.c