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

Allocate DateHeaderValueManager byte array only once. #1055

Closed
wants to merge 1 commit into from

Conversation

cesarblum
Copy link
Contributor

Small thing but avoids an allocation every second. That repeated allocation is not necessary since the date always has the same number of characters (format is ddd, dd MMM yyyy HH:mm:ss GMT).

cc @halter73 @mikeharder @davidfowl

@benaadams
Copy link
Contributor

Torn reads? What happens if its read while being written?

@cesarblum
Copy link
Contributor Author

@benaadams 😭 I guess I could lock but not sure we'd want that vs. allocating.

@cesarblum cesarblum closed this Aug 18, 2016
@benaadams
Copy link
Contributor

benaadams commented Aug 18, 2016

Is only 29 (+ 12?) bytes a second 😄

Isn't like its 88 bytes a request or 176 MB per second aspnet/HttpAbstractions#677 at @ 2M rps :trollface:

@cesarblum cesarblum deleted the cesarbs/dateheadervaluemanager-refactoring branch September 28, 2016 22:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants