-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various Down::ChunkedIO improvements
Instead of trying to optimize every path, we make sure to optimize only the most important one, which is the one with an output buffer. This makes the code a bit easier to reason about. We also make sure that we're dealing with binary encoding all the way until we need to return the result, and only then force to specified encoding if it's different than binary. These changes allow us to easily handle frozen chunks, which fixes #32. While we're at it, we also greatly improve ChunkedIO#gets memory allocation.
- Loading branch information
Showing
4 changed files
with
90 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ source "https://rubygems.org" | |
gemspec | ||
|
||
gem "pry" | ||
gem "memory_profiler" |
This file contains 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
This file contains 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