zephyr/scripts/build
Galen Krulce 5ae9f44825 code_relocation: Cache list of obj files
As part of relocation, this script matches each source file to its
corresponding object file. This matching is done inside of get_obj_filename
which is called once per source file.

get_obj_filename traverses the entire build directory on every invocation.
This is unnecessary since built object files don't change. On a
sufficiently large project (like mine), this script takes over a minute and
the majority of that time is spent needlessly traversing the build
directory again and again.

Caching the list of object files enables this script to run in less than a
second.

I tested by building my project (which enables the relocation script) and
comparing memory breakdown before / after.

Signed-off-by: Galen Krulce <gkrulce@meta.com>
2025-03-28 16:17:11 +01:00
..
check_init_priorities_test.py
check_init_priorities.py
dir_is_writeable.py
elf_parser.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
file2hex.py scripts: build: Add optimizations in file2hex.py to gzip path as well 2025-03-07 19:53:34 +01:00
gen_app_partitions.py scripts: Make gen_app_partitions.py cmake linker generator savvy 2025-03-27 17:17:03 +01:00
gen_cfb_font_header.py
gen_device_deps.py
gen_image_info.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_isr_tables_parser_carrays.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_isr_tables_parser_local.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_isr_tables.py
gen_iter_sections.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_kobject_list.py
gen_kobject_placeholders.py
gen_offset_header.py
gen_relocate_app.py code_relocation: Cache list of obj files 2025-03-28 16:17:11 +01:00
gen_strerror_table.py
gen_strsignal_table.py
gen_symtab.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_syscalls.py
llext_inject_slids.py llext: support multiple string and symbol tables 2025-01-27 08:54:44 +01:00
llext_prepare_exptab.py
llext_slidlib.py
mergehex.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
parse_syscalls.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
process_gperf.py
subfolder_list.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
uf2conv.py
uf2families.json
user_wordsize.py