{"action":"created","issue":{"url":"https://api.github.com/repos/istio/mixer/issues/107","repository_url":"https://api.github.com/repos/istio/mixer","labels_url":"https://api.github.com/repos/istio/mixer/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/istio/mixer/issues/107/comments","events_url":"https://api.github.com/repos/istio/mixer/issues/107/events","html_url":"https://github.com/istio/mixer/pull/107","id":197468137,"number":107,"title":"Optimize the attribute package.","user":{"login":"geeknoid","id":22780957,"avatar_url":"https://avatars.githubusercontent.com/u/22780957?v=3","gravatar_id":"","url":"https://api.github.com/users/geeknoid","html_url":"https://github.com/geeknoid","followers_url":"https://api.github.com/users/geeknoid/followers","following_url":"https://api.github.com/users/geeknoid/following{/other_user}","gists_url":"https://api.github.com/users/geeknoid/gists{/gist_id}","starred_url":"https://api.github.com/users/geeknoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geeknoid/subscriptions","organizations_url":"https://api.github.com/users/geeknoid/orgs","repos_url":"https://api.github.com/users/geeknoid/repos","events_url":"https://api.github.com/users/geeknoid/events{/privacy}","received_events_url":"https://api.github.com/users/geeknoid/received_events","type":"User","site_admin":false},"labels":[{"id":491317866,"url":"https://api.github.com/repos/istio/mixer/labels/cla:%20yes","name":"cla: yes","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-24T15:52:35Z","updated_at":"2016-12-27T21:35:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/istio/mixer/pulls/107","html_url":"https://github.com/istio/mixer/pull/107","diff_url":"https://github.com/istio/mixer/pull/107.diff","patch_url":"https://github.com/istio/mixer/pull/107.patch"},"body":"- Create an emptyBag type to use at the root of the chain\r\nof bags to avoid conditionals throughout the code.\r\n\r\n- Instead of clearing maps to nil on reset, drain them instead\r\nso that we avoid generating a lot of GC garbage.\r\n\r\n- Use a pool to recycle bags across requests. This works with the\r\nabove map improvement to effectively bring to 0 the GC impact of\r\nsteady state usage of the attribute package.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/istio/mixer/107)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/istio/mixer/issues/comments/269386006","html_url":"https://github.com/istio/mixer/pull/107#issuecomment-269386006","issue_url":"https://api.github.com/repos/istio/mixer/issues/107","id":269386006,"user":{"login":"jba","id":18483045,"avatar_url":"https://avatars.githubusercontent.com/u/18483045?v=3","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T21:35:37Z","updated_at":"2016-12-27T21:35:37Z","body":"Next question: why the emphasis on GC? Does that come from experience with kubernetes or other projects? Have you tried the new low-latency collector in Go 1.8?\r\n\r\nSince the Attributes proto will be garbage anyway, you could define a bag to be triple of Attributes proto, dictionary, and parent, and do the int-to-string key lookup lazily. That would simplify and speed up the StartRequest/EndRequest implementation and clearly not generate any additional garbage. (You'd null out the Attributes field when you put the bag back in the pool, but that proto was garbage anyway.)"}}
{"actor":{"display_login":"jba"}}