Adds support for batching requests.#3
Merged
bradoyler merged 1 commit intobradoyler:masterfrom Jul 31, 2014
johncoder:master
Merged
Adds support for batching requests.#3bradoyler merged 1 commit intobradoyler:masterfrom johncoder:master
bradoyler merged 1 commit intobradoyler:masterfrom
johncoder:master
Conversation
Owner
|
💯 You've achieved the anti-DogPile badge 🚫 🐕This looks great... and also a reason to bump version to 0.1.0 |
Owner
|
Curious... what was the exact test u ran to see the ~280% increase? |
Contributor
Author
|
Sample application with a handler that renders a decent chunk of data in a handlebars view, and running the following apache benchmark test before/after: Before I had seen somewhere between 70-90 requests per second. After it leaped to 330-350. Not too scientific, but the results were pretty consistent. |
bradoyler
added a commit
that referenced
this pull request
Jul 31, 2014
Adds support for batching requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@bradoyler Previously, route-cache would allow a big burst of requests to flow into the handler, resulting in a bunch of identical calls to hbs render. This change lets the first one slip in, and batches up each subsequent request until the render completes. As soon as the render is complete, the queued up batch of requests is drained. From the moment the request comes back, a new cache value should be available, which prevents new requests from getting queued up while the queue is drained. So far, I have seen about ~280% increase in requests per second.