commit | ad04c1abe923203b2868ea51a447e32a705f2e0c | [log] [tgz] |
---|---|---|
author | ichern <ichern@google.com> | Mon Oct 21 02:18:30 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Oct 21 02:20:07 2019 -0700 |
tree | a7886cd41941566ce082f89eafd308715dd0e5e5 | |
parent | 5cb9194123a5f193a6f1f9a120a531125f44e54d [diff] |
Implement parallel file processing for the case of parsing Ninja files The main ideas behind this implementation are: 1) using the NIO with direct buffer allocation for reading from file, (a quote from ByteBuffer's javadoc: "Given a direct byte buffer, the Java virtual machine will make a best effort to perform native I/O operations directly upon it. That is, it will attempt to avoid copying the buffer's content to (or from) an intermediate buffer before (or after) each invocation of one of the underlying operating system's native I/O operations.") 2) utilizing the possibilities for parallel processing, since splitting into tokens and parsing them can be done in high degree independently. 3) not creating additional copies of character buffers for keeping tokens and only then specific objects. 4) for absorbing the results, it is possible to create a consumer for each tokenizer, and escape synchronization, summarizing the results after all parallel work is done, of use just one shared consumer with synchronized data structures. Closes #10014. PiperOrigin-RevId: 275801065
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md