+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. 


On Sun, Jun 2, 2024 at 12:34 PM Sam <samueldlightf...@gmail.com> wrote:
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>


On Fri, 31 May 2024 at 21:19, Jacek Lewandowski <lewandowski.ja...@gmail.com> wrote:
Usages of them in tests are ok I think. We have a separate checkstyle file for the test code. 

- - -- --- ----- -------- -------------
Jacek Lewandowski


pt., 31 maj 2024 o 19:14 David Capwell <dcapw...@apple.com> napisał(a):
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 May 31, 2024, at 8:12 AM, Brandon Williams <dri...@gmail.com> wrote:


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.

Kind Regards,
Brandon
 

Reply via email to