On 24/08/16 18:12, Lars Bergstrom wrote:
Currently, the GitHub Servo repository has 134,062 files... 131,477 of
which are in the tests/ directory. Of those, 102,871 are in the CSS WG
tests. I know it's not a perfect measure, but that's also 862megs of
the 1.132gb of disk space usage reported by `du` on macOS for a Servo
checkout.

So, I'd like to have a discussion to see if there's something we can
do here to reduce the number of files. There are two reasons this has
come up:
- If we do end up "copying" the Servo GitHub repository into the
Mozilla monorepo, unfortunately mercurial cannot scale to that number
of files (though there is work going on at Facebook to make it able to
do so in the next year or two). Plus, the non-CSS WG tests in the WPT
directory are duplicate with those already in m-c.
- That's a lot of disk space, and might not be needed for new
contributors who working on anything other than layout features.

There are a few options I can see here (apart from "do nothing"):
1) Reduce the duplication in the CSS WG tests. A lot of it is due to
the build system. How small could we get it? Similar to WPT (i.e., 10x
fewer files)?
2) Break out the CSS WG and WPT tests into a separate location, to be
downloaded as-needed. If we do this, though, what is the workflow for
adding, deleting, or correcting a test? And is it still just as easy
to run a single test? Jamming it in a crate will leave it in a wonky
directory (e.g., target/debug/build/csswg-7062634bbf237306/output)
that is not exactly awesome for viewing & running tests from.

Any opinions or other ideas here?

Currently almost everything in tests/wpt/css-tests (that is, the build output CSSWG’s test repository) is duplicated three times in $spec-short-name/{html,xhtml1,xhtml1print} directory.

We can probably hack the build system to not generate xhtml1 and xhtml1print directories at all, since we don’t use them.

Some files (some of them relatively large, like reference/support/big-buck-bunny-240p.webm) are also duplicated across multiple specs. Again by hacking the build script I think we can have a single "support" directory shared across specs, with a step that checks that files with colliding names have identical content. (If that’s not always the case, we’d have rename some files in the source and update tests that use them.)


With this, I expect we can reduce the number of files by 3x and the size in bytes more than that.

--
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to