+1 agree with all this. Also fine to just use in tests or ban completely. On Jun 2, 2024, at 11:58 AM, Jake Luciani <j...@apache.org> wrote:
+1 Java streams cause perf issues in hot paths. Its fine for tests and slow paths. But for clairity its fine to ban it as well if the majority agrees.
I completely agree with this. I suspect there is a lot of low-hanging fruit with easy perf wins.
On profiling a 90% write workload I found StorageProxy::updateCoordinatorWriteLatencyTableMetric to be a hot-path, consuming between 15-20% of ModificationStatement::executeWithoutCondition cycles. https://github.com/apache/cassandra/pull/3344<image.png>
Usages of them in tests are ok I think. We have a separate checkstyle file for the test code. - - -- --- ----- -------- ------------- Jacek Lewandowski
I am cool for forbidding with a callout that tests are ok. I am cool with forbidding in tests as well, but thats just for consistency reasons than anything.
On Fri, May 31, 2024 at 9:35 AM Abe Ratnofsky < a...@aber.io> wrote: +1 to forbidding Stream usage entirely; the convenience of using them outside of hot paths is less than the burden of figuring out whether or not a particular path is hot.
I think I have most frequently appreciated them in tests, which I think we could except, since these are categorically not in the hot path.
|
- Re: [DISCUSS] Stream Pipelines on hot paths J. D. Jordan
-