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 scripts: build: check_init_priorities: remove obsolete code 2024-10-02 09:49:53 +02:00
check_init_priorities.py scripts: build: check_init_priorities: remove obsolete code 2024-10-02 09:49:53 +02:00
dir_is_writeable.py python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00
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 script: gen_isr_tables: remove unnecessary warning log 2024-02-26 11:55:59 +00:00
gen_iter_sections.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
gen_kobject_list.py scripts: build: gen_kobject_list.py check _driver_api suffix 2024-05-03 14:44:41 +01:00
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 Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
llext_inject_slids.py llext: support multiple string and symbol tables 2025-01-27 08:54:44 +01:00
llext_prepare_exptab.py llext: add support for SLID-based linking 2024-06-03 15:29:34 -04:00
llext_slidlib.py python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00
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 scripts: process_gperf: upgrade the asso_values type to unsigned short 2024-11-27 06:57:23 -05:00
subfolder_list.py scripts: build: Make scripts executable 2025-01-15 15:06:01 +01:00
uf2conv.py scripts: Update uf2conv.py from upstream git. 2024-05-08 09:31:07 -04:00
uf2families.json UF2: Enable support for Raspberry Pi RP2350 2024-12-23 23:57:57 +01:00
user_wordsize.py python: Format trivial files where only newlines were missing 2024-11-21 20:10:51 +01:00