Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform level: Reduce interface dispatch and trys in main loop #412

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

benaadams
Copy link
Contributor

@sebastienros
Copy link
Member

sebastienros commented Mar 13, 2018

6,460,818 RPS

Getting close to the 7M top contender

@benaadams
Copy link
Contributor Author

benaadams commented Mar 13, 2018

Added PR to change parsing to pass ReadOnlySequence via in aspnet/KestrelHttpServer#2389

var examined = buffer.End;
if (!buffer.IsEmpty)
{
ParseHttpRequest(in buffer, out consumed, out examined);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you passing in here explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason; will change :)

{
consumed = buffer.Start;
examined = buffer.End;

if (_state == State.StartLine)
var parsedStartLine = _state == State.StartLine;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parsingStartLine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

var examined = buffer.End;
if (!buffer.IsEmpty)
{
ParseHttpRequest(in buffer, out consumed, out examined);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you specifying in.

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm confused by in

{
consumed = buffer.Start;
examined = buffer.End;

if (_state == State.StartLine)
var parsingStartLine = _state == State.StartLine;
if (parsingStartLine)
{
if (Parser.ParseRequestLine(this, buffer, out consumed, out examined))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to allow passing buffer by-in?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we just changed this in Kestrel.

@davidfowl davidfowl merged commit 2ce4521 into aspnet:dev Mar 14, 2018
@ErikEJ
Copy link

ErikEJ commented Mar 15, 2018

Now go fix SqlClient 😁

@sebastienros
Copy link
Member

@ErikEJ yeah, and we are actively working on making it faster too, but FYI SqlClient is already faster than the implementations for NodeJs and Java that we tested, measured on Windows (SNI) and Linux (managed). The SqlClient team has already made great improvements that will be visible with the next release (faster on Linux, faster azure encrypted connections, reliability, ...), and it will also benefit 2.0 apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants