Skip to content

Suspecting downgraded performance #58

@melroy89

Description

@melroy89

I suspect the following code, is maybe causing down-graded performance:

In FetchAndParseJson():

std::stringstream body;
body.str(); // <--- here

Is a stringstream indeed slow in converting 'large' data to a string?

Another cause could be in ParseJson:

Json::parse(input);

Additional debugging and performance measurements are required!

I see it takes 6ms to execute a simple swarm/peers request. Sure, this specific call could take longer. Yet other API calls are executed (far) below 1ms. And the difference with curl command doesn't show much time differences between those different API calls.

The main difference is the body response size.

Just a thought experiment. Again, does requires follow-up research.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions