Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen_kobject_list.py is extremely slow #84034

Open
arbrauns opened this issue Jan 15, 2025 · 3 comments
Open

gen_kobject_list.py is extremely slow #84034

arbrauns opened this issue Jan 15, 2025 · 3 comments
Assignees
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@arbrauns
Copy link
Contributor

arbrauns commented Jan 15, 2025

Describe the bug
With CONFIG_USERSPACE enabled, gen_kobject_list.py can take an obscenely long time to run, approximately 30s in our current (decently large) project.

To Reproduce

  1. Set CONFIG_USERSPACE=y in a large project
  2. Build with ninja -v
  3. Watch the jobs for kobject_prebuilt_hash.gperf and kobject_hash.gperf take a very long time

This can even be observed in the barebones samples/userspace/hello_world_user, where each of those takes 0.6s.

Expected behavior
Generating these tables should not take up a significant part of the total build time.

Impact
For affected projects (large, with userspace enabled), this makes the already slow link times much, much worse. Touching a single file makes a subsequent build take 60 seconds, approximately 55 of which are spent waiting on the two invocations of gen_kobject_list.py.

Environment (please complete the following information):

  • OS: Ubuntu 24.04
  • Toolchain: Zephyr SDK 0.16.8
  • Commit SHA or Version used: v3.7.0
@arbrauns arbrauns added the bug The issue is a bug, or the PR is fixing a bug label Jan 15, 2025
@kartben kartben added the priority: low Low impact/importance bug label Jan 21, 2025
@kartben
Copy link
Collaborator

kartben commented Jan 21, 2025

@arbrauns is this something you were not observing in previous versions of Zephyr and you would then describe as a regression?

@ubieda
Copy link
Member

ubieda commented Jan 21, 2025

Dropping link to related long-standing known issue: #8559

@arbrauns
Copy link
Contributor Author

is this something you were not observing in previous versions of Zephyr and you would then describe as a regression?

No, I don't think this is particularly new, it's more that as the project grew larger it eventually got to a point where I got sick of just accepting and ignoring it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants