Skip to content

Performance: imapnio spend most of its time filling stacktraces #119

Open
@chibenwa

Description

@chibenwa

Description

An analysis of imapnio with a profiler showed most of its time is spent filling stack traces due to integer parsing.

Screenshot from 2022-04-13 09-18-51

The underlying IMAPResponse from javax.mail does an attempt to parse untagged responses under the format * NUMBER KEYWORD exemple * 36 EXISTS.

However some commands like LIST

Expected Behavior

Avoid filling this stacktrace.

Actual Behavior

Fills the stacktrace and spends a lot of time doing so (40% of CPU time dedicated to imapnio)

Possible Fix

It looks like overriding this behaviour in IMAPResponse not to be feasible (init method doing such a check is private)

Context

I am using imapnio to write an IMAP benchmarking tool: https://github.com/linagora/gatling-imap/ . As such, in order not to impact performance measurement low latencies are paramount on the injection side.

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