Skip to content

part 2, significantly shrinking ninja file size #4745

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

Merged
merged 8 commits into from
Oct 13, 2020
Merged

Conversation

bobzhang
Copy link
Member

@bobzhang bobzhang commented Oct 13, 2020

Given two targerts, previously:

build  src/a001.cmj |  src/a001.cmi ../js/src/a001.js : ml_cmj_cmi src/a001.mlast ||  src/a001.d
  g_pkg_flg = $g_pkg_flg  -bs-package-output commonjs:lib/js/src:.js
build  src/a002.cmj |  src/a002.cmi ../js/src/a002.js : ml_cmj_cmi src/a002.mlast ||  src/a002.d
  g_pkg_flg = $g_pkg_flg  -bs-package-output commonjs:lib/js/src:.js

Now:

o  src/a0001.cmj |  src/a0001.cmi ../js/src/a0001.js : mij src/a0001.mlast ||  src/a0001.d
o  src/a0002.cmj |  src/a0002.cmi ../js/src/a0002.js : mij src/a0002.mlast ||  src/a0002.d

As you can see, the build statement is much simplified, we basically just list outputs/inputs, the size is halved, in the long term future, we may eliminate the need for build.ninja, which means we may handle 100K files without any in memory caching

@bobzhang bobzhang merged commit 4268d18 into master Oct 13, 2020
@cristianoc cristianoc deleted the shrink_ninja_file branch June 18, 2022 02:24
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.

1 participant