{"action":"created","issue":{"url":"https://api.github.com/repos/google/protobuf/issues/868","labels_url":"https://api.github.com/repos/google/protobuf/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf/issues/868/comments","events_url":"https://api.github.com/repos/google/protobuf/issues/868/events","html_url":"https://github.com/google/protobuf/pull/868","id":110717652,"number":868,"title":"POC: Supporting zero-copy for writing","user":{"login":"nmittler","id":6493296,"avatar_url":"https://avatars.githubusercontent.com/u/6493296?v=3","gravatar_id":"","url":"https://api.github.com/users/nmittler","html_url":"https://github.com/nmittler","followers_url":"https://api.github.com/users/nmittler/followers","following_url":"https://api.github.com/users/nmittler/following{/other_user}","gists_url":"https://api.github.com/users/nmittler/gists{/gist_id}","starred_url":"https://api.github.com/users/nmittler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmittler/subscriptions","organizations_url":"https://api.github.com/users/nmittler/orgs","repos_url":"https://api.github.com/users/nmittler/repos","events_url":"https://api.github.com/users/nmittler/events{/privacy}","received_events_url":"https://api.github.com/users/nmittler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/protobuf/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-09T18:58:22Z","updated_at":"2015-10-15T22:39:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/868","html_url":"https://github.com/google/protobuf/pull/868","diff_url":"https://github.com/google/protobuf/pull/868.diff","patch_url":"https://github.com/google/protobuf/pull/868.patch"},"body":"Added an Encoder interface implemented by CodedOutputStream and the\r\nnew ZeroCopyEncoder. Added an UnsafeByteString that wraps around a\r\nByteBuffer and allows access to the underlying buffer.\r\n\r\nCreated a JMH EncoderBenchmark that creates a simple protobuf initialized\r\nwith 10 ints, 10 small strings, and 10 small ByteStrings, as well as one\r\nByteString that varies in size between tests (SMALL=10, MEDIUM=1KB,\r\nLARGE=100KB, JUMBO=10MB). I also vary the internal buffer size used by\r\nboth encoders (SMALL=1KB, MEDIUM=4KB, LARGE=8KB).\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/google/protobuf/868)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/google/protobuf/issues/comments/148543481","html_url":"https://github.com/google/protobuf/pull/868#issuecomment-148543481","issue_url":"https://api.github.com/repos/google/protobuf/issues/868","id":148543481,"user":{"login":"nmittler","id":6493296,"avatar_url":"https://avatars.githubusercontent.com/u/6493296?v=3","gravatar_id":"","url":"https://api.github.com/users/nmittler","html_url":"https://github.com/nmittler","followers_url":"https://api.github.com/users/nmittler/followers","following_url":"https://api.github.com/users/nmittler/following{/other_user}","gists_url":"https://api.github.com/users/nmittler/gists{/gist_id}","starred_url":"https://api.github.com/users/nmittler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmittler/subscriptions","organizations_url":"https://api.github.com/users/nmittler/orgs","repos_url":"https://api.github.com/users/nmittler/repos","events_url":"https://api.github.com/users/nmittler/events{/privacy}","received_events_url":"https://api.github.com/users/nmittler/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T22:39:46Z","updated_at":"2015-10-15T22:39:46Z","body":"\n\n\n\nReview status: 14 of 39 files reviewed at latest revision, 12 unresolved discussions, some commit checks failed.\n\n---\n\n<sup>**[java/src/main/java/com/google/protobuf/ZeroCopyEncoder.java, line 46 \\[r5\\]](https://reviewable.io:443/reviews/google/protobuf/868#-K0hPU_FemDusIDQZxzw)** ([raw file](https://github.com/google/protobuf/blob/149d415a1cdf5bae80ca92d07a86fcfd97468781/java/src/main/java/com/google/protobuf/ZeroCopyEncoder.java#L46)):</sup>\nI'd like to explore ways of using `Encoder` first if possible. The `CodedInputStream` class brings a lot of cruft that it would be good to start migrating away from.\n<!-- Reviewable comment -K0he0Dvb1vSA5N0Wj-Y:570611637 -->\n\n---\n\n\nComments from the [review on Reviewable.io](https://reviewable.io:443/reviews/google/protobuf/868)\n<!-- Sent from Reviewable.io -->\n"}}