Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5ba8a8b7 authored by Dennis Shen's avatar Dennis Shen
Browse files

aconfig: create flag info file at build time

Previously flag info file is created at run time rather than at build
time due to two reasons:
1, it saves some storage space on each container
2, initially the flag info file does not container any flag non run time
info, so creating this file at run time on device is more efficient.

However, flag info file is fairly compact, 1 byte per flag. So the
storage footprint increase is minimal. Also, now flag info file contains
flag information known at the build time such as if the flag is read
write. To help create flag info file at run time, we actually have to
keep additional information on flag map file. Then use this information
to create flag info file at run time. Now it is more efficient to just
create flag info file at build time.

In addition, to create flag info file at run time, we need to maintain
an additional write api create_flag_info_file. Each time flag file
version changes, we have to keep the old version of this API as well. If
we create flag info file at build time, then we don't have to maintain
this API.

Overall the benefits outweight the 1 byte per flag storage overhead.
Therefore making this change to create flag info file at build time.

Bug: b/301491148
Test: m
Change-Id: I33993a438bbaf8697214655288ced30817b9592e
parent eda61c1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment