Skip to content

[BUG/performance] Serialization/Deserialization check for safe classes adds performance overhead #4760

@krishna-ggk

Description

@krishna-ggk

What is the bug?
While debugging latency contributors in an OpenSearch 2.13 cluster using JDK serialization, we noticed SafeSerializationUtils.isSafeClass adds ~20% overhead to latency although it isn't as visible in flamegraphs (0.02%) (This was validated by short circuiting isSafeClass to return).

image

image

What is the expected behavior?
It seems like a very low hanging fruit to gain significant performance benefit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.v2.19.0Issues targeting release v2.19.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions