Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Add caching to build.ninja generation 💾 #163

Open
jmackie opened this issue Jan 6, 2023 · 0 comments
Open

Add caching to build.ninja generation 💾 #163

jmackie opened this issue Jan 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jmackie
Copy link
Member

jmackie commented Jan 6, 2023

Atm we parse every source file on every ditto make in order to generate the build.ninja.

fn prepare_build_graph(
sources: Sources,
package_sources: PackageSources,
ditto_version: &semver::Version,
) -> Result<(BuildGraph, BuildGraphNodes)> {

This is hella inefficient. Particularly given that package sources aren't really going to change.

So I reckon we should generate a build.ninja.fragment for each package, and stitch them together on warm ditto make runs. That fragment should be invalidated/regenerated when the package sources are touched.

@jmackie jmackie added the enhancement New feature or request label Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant