Skip to content

Question: getLocalHost each event? #44

@lassic

Description

@lassic

Hi,

I noticed that every time a EventDSL is constructed there is a call to getLocalHost, which on my AWS instance has an avg. of 10-20ms per call. It's not much per call perhaps, but accumulates when firing a lot of events.

Do you expect the machine's IP to change during the lifetime of the client? Shouldn't this at least be configurable? It seems like a waste calling this for each event if the IP doesn't change.

I can either submit a PR where I'm statically caching this once and reusing it in the constructor, or if you think this is how it should continue to work I can create a fork.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions