Skip to content

build: Only rerun profiles generation when its inputs change - #1079

Merged
christophe-lunarg merged 1 commit into
mainfrom
build-time-optimization
Oct 30, 2026
Merged

christophe-lunarg merged 1 commit into
mainfrom
build-time-optimization

Conversation

@christophe-lunarg

Copy link
Copy Markdown
Collaborator

The vkprofiles generation steps were custom targets without outputs, so every build reran them and rewrote the generated headers and sources, recompiling and relinking all the tests.

  • Use custom commands with OUTPUT and DEPENDS for the profiles graph, the test graph, the test library, the layer and layer tests sources, the combine test profiles and the Android profiles transform.
  • Run the generated requirements steps as a single vkprofiles graph execution instead of 27 vkprofiles processes.
  • Only rewrite baked_version.py when its content changes, and only create the generated library placeholders when missing, so reconfiguring doesn't trigger a PyInstaller rebuild and a full recompile.

On macOS with BUILD_TESTS=ON, a no-op build goes from 55s to 1s and a cold build from 72s to 33s.

The vkprofiles generation steps were custom targets without outputs, so
every build reran them and rewrote the generated headers and sources,
recompiling and relinking all the tests.

- Use custom commands with OUTPUT and DEPENDS for the profiles graph, the
  test graph, the test library, the layer and layer tests sources, the
  combine test profiles and the Android profiles transform.
- Run the generated requirements steps as a single vkprofiles graph
  execution instead of 27 vkprofiles processes.
- Only rewrite baked_version.py when its content changes, and only create
  the generated library placeholders when missing, so reconfiguring
  doesn't trigger a PyInstaller rebuild and a full recompile.

On macOS with BUILD_TESTS=ON, a no-op build goes from 55s to 1s and a
cold build from 72s to 33s.
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build queued with queue ID 178761.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build queued with queue ID 178761.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build # 4717 running.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build # 4717 passed.

@christophe-lunarg
christophe-lunarg merged commit 96b1622 into main Oct 30, 2026
11 checks passed
@christophe-lunarg
christophe-lunarg deleted the build-time-optimization branch October 30, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants