Skip to content

Build directory search lists once instead of parsing strings#290

Open
quic-parihar wants to merge 3 commits into
qualcomm:developmentfrom
quic-parihar:path_list_update
Open

Build directory search lists once instead of parsing strings#290
quic-parihar wants to merge 3 commits into
qualcomm:developmentfrom
quic-parihar:path_list_update

Conversation

@quic-parihar

Copy link
Copy Markdown
Contributor

Convert ADSP library and AVS search paths from concatenated env/config strings into persistent QList-backed directory lists built at init time. This removes repeated parsing of ';'-delimited path strings on every fopen call and avoids reconstructing combined search paths for each lookup.

The new logic initializes two global directory lists (library and AVS) during apps_std_init(). Paths from environment variables and config files are parsed once and stored as individual nodes. All file lookup APIs are updated to walk these lists directly instead of reparsing a flat string.

This improves efficiency, reduces string and handling complexity. Legacy behavior is preserved for custom environment variables that do not match the standard ADSP_* and DSP_* path names.

Also update open_shell() to use the global list instead of constructing a temporary ";"-delimited directory list.

@quic-parihar quic-parihar force-pushed the path_list_update branch 3 times, most recently from 337158e to 89d3060 Compare February 5, 2026 06:10
@quic-parihar quic-parihar marked this pull request as ready for review February 10, 2026 06:51
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread inc/apps_std_internal.h Outdated
Comment thread inc/apps_std_internal.h Outdated
Comment thread src/fastrpc_apps_user.c Outdated
Comment thread src/fastrpc_config_parser.c Outdated
Comment thread inc/apps_std_internal.h
Comment thread src/apps_std_imp.c Outdated
@quic-parihar quic-parihar force-pushed the path_list_update branch 2 times, most recently from fc06976 to 7df7879 Compare February 26, 2026 10:14
@quic-vkatoch

Copy link
Copy Markdown
Contributor

Fixes: #270

Comment thread src/fastrpc_config_parser.c Outdated
Comment thread src/fastrpc_config_parser.c Outdated
Comment thread src/fastrpc_config_parser.c Outdated
Comment thread src/fastrpc_config_parser.c Outdated
Comment thread src/fastrpc_config_parser.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/apps_std_imp.c Outdated
Comment thread src/fastrpc_apps_user.c Outdated
Comment thread inc/apps_std_internal.h Outdated
@quic-parihar quic-parihar force-pushed the path_list_update branch 2 times, most recently from 7c2494c to e15ca41 Compare May 14, 2026 06:30
Convert ADSP library search paths from concatenated env/config
strings into persistent QList-backed directory lists built at init
time. This removes repeated parsing of ';' delimited path strings on
every fopen call and avoids reconstructing combined search paths for
each lookup.

The new logic initializes global directory list during apps_std_init().
Paths from environment variables and config files are parsed once and
stored as individual nodes. All file lookup APIs are updated to walk
this list directly instead of reparsing a flat string.

This improves efficiency, reduces string and handling complexity.
Legacy behavior is preserved for custom environment variables that do
not match the standard ADSP_* and DSP_* path names.

Also update open_shell() to use the global list instead of constructing
a temporary ";" delimited directory list.

Signed-off-by: Abhinav Parihar <parihar@qti.qualcomm.com>
Previously, while parsing DSP library paths from the config YAML, we
only prefixed CONFIG_BASE_DIR (/usr/share/qcom) to the first path.
This caused subsequent relative paths to be left unresolved, leading
to incomplete search coverage and potential library load failures.

Update the parsing logic to:
- Iterate over all semicolon-separated entries in dsp_lib_paths.
- Prefix CONFIG_BASE_DIR to every relative path

Signed-off-by: Abhinav Parihar <parihar@qti.qualcomm.com>
This patch removes Windows-style CRLF line terminators and converts the
file to Unix-style LF line endings. No functional changes are made; this
only normalizes formatting to match the project's coding conventions.

Signed-off-by: Abhinav Parihar <parihar@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants