You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To my understanding this is done using a single thread.
Because each file is independent then we could allow to run this with a thread pool where we can use multiple threads. For example number of cores - 1 (leave 1 core for computer to be responsive).
The text was updated successfully, but these errors were encountered:
This would be nice. My main concern is that some of the formatters might not be thread safe. It would make sense to initialize them once, and then reuse them for each applicable file. DEBUG log messages might get messy, too, if the formatters are running concurrently, but I don't think that's a big deal. At least, we can address that if necessary later.
Running a parallel stream of files would make this trivial to implement in the built-in shared ForkJoinPool, but the ResultCollector would have to switch to using AtomicLong for its counters.
With a 8 core M1 then when we run a clean build of Apache Camel Core then it takes 5 seconds to check all the source code files
[INFO] --- formatter-maven-plugin:2.17.0:format (format) @ camel-core ---
[INFO] Processed 2625 files in 5s26ms (Formatted: 0, Unchanged: 2625, Failed: 0, Readonly: 0)
To my understanding this is done using a single thread.
Because each file is independent then we could allow to run this with a thread pool where we can use multiple threads. For example number of cores - 1 (leave 1 core for computer to be responsive).
The text was updated successfully, but these errors were encountered: