forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a direct byte[] path for IO writes
Several Java-based consumers of RubyIO write to it without having a RubyString in hand, by wrapping incoming byte[] or ByteList. This patch adds a write path that can accept unwrapped byte[] plus encoding to reduce allocation and follow a fast path. Users that hit this logic, mostly via IOOutputStream: * The Psych ext when dumping to an IO * For stdout and stderr streams provided by Ruby.getError/OutputStream * By Marshal for dumping to a target IO or IO-like * By GzipWriter for writing to a stream * Anyone that calls to_outputstream on an IO Part of work for jruby#6589
- Loading branch information
Showing
6 changed files
with
236 additions
and
72 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
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
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
Oops, something went wrong.