{"push_id":2083418581,"size":1,"distinct_size":1,"ref":"refs/heads/github-master","head":"5e000d5ef50b64622ce819bed958e5741878dd22","before":"dcc2811d754ab0bc720711f3e7e306e7df192ade","commits":[{"sha":"5e000d5ef50b64622ce819bed958e5741878dd22","author":{"name":"Yiding Jia","email":"84f92ac2001280e49f0ef1c97df3427725b4be4c@fb.com"},"message":"Add a weakInterner for strings from buck file parsing results\n\nSummary:\nThis adds a weakInterner for strings emitted by the json parser when deserializing buck python output. This deduplicates identical strings.\n\nExperimentally, this reduces memory usage of target graph cache, as measured by memory retained by `DaemonicCellState` instances after a 'buck targets foo` call, by 60 to 70%, with minimal CPU overhead. The interner itself uses about 30 MB for 600k unique strings (but can likely store more without resizing).\n\nNot using `String.intern` because that uses a fixed size hash table, whose default value is much smaller than the number of strings we intern.\n\nNot complicating this with any sort of configurability or since the interner behavior is transparent and the overhead is negligible. Also, since re-parsing can be done incrementally, it would be good to deduplicate the strings used between parsing runs (for instance, strings representing target names that could be used across different files).\n\nTest Plan: Running in buckd mode, call 'buck targets foo', where foo is a top level target. This causes the parser cache to be loaded with parsed json of all transitive dependencies of `foo`. Dump the heap and examine DaemonicCellState objects and see their retained memory. Overall heap size should be reduced as well.\n\nReviewed By: ttsugriy\n\nfbshipit-source-id: ef475c7","distinct":true,"url":"https://api.github.com/repos/GerritCodeReview/buck/commits/5e000d5ef50b64622ce819bed958e5741878dd22"}]}
{"actor":{"display_login":"lucamilanesio"}}