Evan Martin
Evan Martin
> Though what "tricky hack" are you talking about? The custom "database" defined in db.rs. I think Ninja has some extra goop in it for the databasey corner cases, where...
[Relevant code in Android's Ninja fork](https://android.googlesource.com/platform/external/ninja/+/refs/heads/main/src/util.cc#443). (Not sure how to get a permalink to that commit but the file is unlikely to change much in the future, but it's the...
I wrote a mini benchmark [here](https://github.com/evmar/n2/compare/mmap-file-benchmark?expand=1). On this Mac Air M2 for a random 1.4gb file: without `madvise`: ``` ./target/release/read-file mmap $F ran 1.25 ± 0.01 times faster than ./target/release/read-file...
> can this invalidate the memory mapping? The Linux man pages says it's undefined behavior. The Mac ones don't say either way. It is true that we wouldn't want to...
Thanks for filing this! Looking at the bug in the error message, they mention how you can't just then dereference the pointer and need to"[make] sure that the reference stops...
I was about to say that's a convincing argument for not keeping the files in memory, but I guess if we mmap'd the files the memory use of keeping them...
Note to self, to find all the places we use line numbers, the trick is to comment out the `impl std::fmt::Display for FileLoc` and see where the errors are.
Having thought about this a bit, I am curious about the "spawning subprocesses takes some time" part. If it's a skip-a-frame kind of latency, like up to 100ms occasionally, then...
Dang, that's a pretty strong argument that we ought to fix this. Unfortunately it will likely end up fairly costly. :( n2 is very aggressive about trying to do work...
> For what it's worth, this was one of the two issues I faced in our build when trying to switch over to n2 from ninja. Our build generator would...