Closed
Description
Christoph Dreis opened SPR-14625 and commented
Hey,
while looking into #19191 I noticed another case of unnecessary and rather costly string concatenations. Not as severe as in #19191 but with a factor of 8 it still has an effect. Applications that send a lot of websocket messages could benefit from this as it eases the pressure on the heap.
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
MyBenchmark.testAssertNormal | thrpt | 30 | 21121,046 | 225,696 | ops/s |
MyBenchmark.testAssertEnhanced | thrpt | 30 | 173947,320 | 2253,248 | ops/s |
I used traditional if statements instead of the supplier functionality in Assert in order to be able to backport it to 4.3.x or even 4.2.x - much like the fixes for #19191.
Cheers
Affects: 4.2.7, 4.3.2
Reference URL: #1139
Issue Links:
- Improve performance of assertion in StompSubProtocolHandler [SPR-14624] #19191 Improve performance of assertion in StompSubProtocolHandler
Backported to: 4.2.8