{"action":"created","issue":{"url":"https://api.github.com/repos/google/protobuf/issues/2304","repository_url":"https://api.github.com/repos/google/protobuf","labels_url":"https://api.github.com/repos/google/protobuf/issues/2304/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf/issues/2304/comments","events_url":"https://api.github.com/repos/google/protobuf/issues/2304/events","html_url":"https://github.com/google/protobuf/pull/2304","id":186007650,"number":2304,"title":"Support hash computation for protobuf messages.","user":{"login":"slavanap","id":1901547,"avatar_url":"https://avatars.githubusercontent.com/u/1901547?v=3","gravatar_id":"","url":"https://api.github.com/users/slavanap","html_url":"https://github.com/slavanap","followers_url":"https://api.github.com/users/slavanap/followers","following_url":"https://api.github.com/users/slavanap/following{/other_user}","gists_url":"https://api.github.com/users/slavanap/gists{/gist_id}","starred_url":"https://api.github.com/users/slavanap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavanap/subscriptions","organizations_url":"https://api.github.com/users/slavanap/orgs","repos_url":"https://api.github.com/users/slavanap/repos","events_url":"https://api.github.com/users/slavanap/events{/privacy}","received_events_url":"https://api.github.com/users/slavanap/received_events","type":"User","site_admin":false},"labels":[{"id":151794609,"url":"https://api.github.com/repos/google/protobuf/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-28T19:54:52Z","updated_at":"2016-11-02T23:45:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/2304","html_url":"https://github.com/google/protobuf/pull/2304","diff_url":"https://github.com/google/protobuf/pull/2304.diff","patch_url":"https://github.com/google/protobuf/pull/2304.patch"},"body":"This pull request relates to following issue: https://github.com/google/protobuf/issues/2066\n\nIt adds hash computation support for `::google::protobuf::Message` class and for all generated classes for messages in C++ code.\n\nThis pull request is **a draft** because I need advise or help about how to\n1) write tests for added code (unfortunately, I'm not familiar with google test framework and have not written much tests in my life),\n2) change or regenerate .pb.h files within protobuf repository according changes in these files' generator.\n\nAnd of course I need a code review.\n\n@xfxyjwf \nWe can move discussion from issue ticket here, if you want.\nAnd sorry for the delay. Life is hard sometimes.\n"},"comment":{"url":"https://api.github.com/repos/google/protobuf/issues/comments/258033286","html_url":"https://github.com/google/protobuf/pull/2304#issuecomment-258033286","issue_url":"https://api.github.com/repos/google/protobuf/issues/2304","id":258033286,"user":{"login":"xfxyjwf","id":8551050,"avatar_url":"https://avatars.githubusercontent.com/u/8551050?v=3","gravatar_id":"","url":"https://api.github.com/users/xfxyjwf","html_url":"https://github.com/xfxyjwf","followers_url":"https://api.github.com/users/xfxyjwf/followers","following_url":"https://api.github.com/users/xfxyjwf/following{/other_user}","gists_url":"https://api.github.com/users/xfxyjwf/gists{/gist_id}","starred_url":"https://api.github.com/users/xfxyjwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfxyjwf/subscriptions","organizations_url":"https://api.github.com/users/xfxyjwf/orgs","repos_url":"https://api.github.com/users/xfxyjwf/repos","events_url":"https://api.github.com/users/xfxyjwf/events{/privacy}","received_events_url":"https://api.github.com/users/xfxyjwf/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T23:45:09Z","updated_at":"2016-11-02T23:45:09Z","body":"@slavanap I agree that the performance of a reflection-based implementation will be a concern, though we just can't afford the code size increase. Adding an option is also unlikely to be accepted as we generally don't allow new options unless necessary.\r\n\r\nThe good news is that we are currently experimenting a light-weight reflection implementation that are designed to replace most of the generated methods and it offers a much faster speed than what the existing reflection API offers. When that's ready, we should be able to implement the hash function based on that and get both benefits (i.e., fast hash without generated code). Until then, we can only accept reflection-based hash implementation to the protobuf library.\r\n\r\nYou can still implement a generated hash function using a protocol compiler plugin though, i.e., instead of making it a part of protobuf library, use a standalone compiler plugin that will generate the hash<> functions separately (or injected into the protoc genreated files). "}}
{"actor":{"display_login":"xfxyjwf"}}