Skip to content

Performance enhancement suggestion: Simplified package matcher that only does a simple "Start with" check for better performance #1522

@keiki61

Description

@keiki61

Greetings,

We have in our company a lot of arch unit tests running. So I looked into the profiler to see what could be a straight forward way to achieve a runtime performance benefit.

I saw that the packages are being matched using regex. Regex is fast for sure. Yet simple String comparison is even faster.

That's why I created this simplified package matcher. I provide a patch in the attachment.

The performance gain was roughly 10% for my test case.

What do you think? I think it brings enough benefit that it's not premature optimisation.

Example_implementation_of_package_matcher_with_starts_with_implementation_instead_of_using.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions