src: port bootstrap/cache.js to C++#27046
Conversation
|
cc @nodejs/process @nodejs/build-files PTAL, I am looking into rewriting |
src/node_native_module.cc
Outdated
There was a problem hiding this comment.
Consider caching result as an Environment field or compute it eagerly inNativeModuleLoader::Initialize().
It feels kind of wasteful to recompute it every time and it breaks object identity (although that's more of an academic issue since it's only used internally.)
There was a problem hiding this comment.
I think it's actually kind of wasteful to compute this eagerly since this is only used in the code cache generator and the tests/benchmarks. Normal use cases do not need this at all, and the code that do use this only compute it once per process.
|
Linux will fail again because it got the bad ubuntu18-04 host again. I've taken it offline and will restart CI again. Windows already failed again. 😞 |
benjamingr
left a comment
There was a problem hiding this comment.
lgtm overall though I haven't worked on this code :]
This allows us to query the categories of modules in C++ so we can implement the code cache generator in C++ that does not depend on a Node.js binary.
4e6fdad to
a7f8857
Compare
|
Landed in e1d55a0 |
This allows us to query the categories of modules in C++
so we can implement the code cache generator in C++ that
does not depend on a Node.js binary.
Ref: #21563
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes