mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-08 06:31:50 +00:00
We spend a lot of wasted time parsing the entire manifest in some areas, when only the header is needed. This patch adds a header_only flag that tells the appropriate load manifest functions to quit early after the header is read, instead of parsing the entire (possibly very large) manifest. Another optimization is calling fopen() with the 'm' flag, which tries to use mmap to access the file (for reading only). Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>