Skip to content

Fix assertions in StompHeaderAccessor [SPR-14625] #19192

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Backported to: 4.2.8

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions