Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Don't use guid in GetRequestIdentifier #306

Closed
halter73 opened this issue Jul 22, 2015 · 2 comments
Closed

Don't use guid in GetRequestIdentifier #306

halter73 opened this issue Jul 22, 2015 · 2 comments
Assignees
Milestone

Comments

@halter73
Copy link
Member

Guid.NewGuid and Guid.ToString are a little slow. Using a incrementing long instead with an random starting seed will likely be faster.

We should also look at the most efficient way to generate a string from this long.

profile

@halter73 halter73 added the Perf label Jul 22, 2015
@Eilon
Copy link
Member

Eilon commented Jul 23, 2015

We've had a lot of discussion before on Guid vs. other types of ids. Could we still use a Guid but generate it ourselves? Just thinking out loud here.

@Tratcher
Copy link
Member

@halter73's description sounds like what System.Web did previously.

You could also make Kestrel generate it directly using something like the socket handle and a request counter.

@DamianEdwards DamianEdwards added this to the 1.0.0-rc1 milestone Oct 2, 2015
@DamianEdwards DamianEdwards self-assigned this Oct 2, 2015
DamianEdwards added a commit that referenced this issue Oct 5, 2015
- FastHttpRequestIdentifierFeature uses an incrementing long with an int seed
- Everything is lazy so no computer incurred if ID is not asked for
- Optimized routine to stringify the ID
- #306
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants