You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an object is passed, it first format the tags using formatTags and then do the above. This is extra bad since it allocates "a:b", then take it apart, then reform "a:b". Might be the same memory wise due to v8's string interning, but at least it wastes many cpu cycles.
Sorry for the slow response on this, and thanks for the info. As a heads up, no one is fixing any of the issues that come up here- this is all community-driven. So if you are interested in doing this, please feel free. Thanks.
Based on our profiling result, it accounts for 5% of total memory allocation in our production servers.
Based on the implementation here,
hot-shots/lib/helpers.js
Lines 33 to 43 in f28d646
It generates many intermediate strings by parsing the given formatted tags.
[ "a:b", "c:d" ]
, it reparses them into{ "a": "b", "c": "d" }
and then reforms the strings[ "a:b", "c:d" ]
->{ "a": "b", "c": "d" }
->[ "a:b", "c:d" ]
{ "a": "b", "c": "d" }
->[ "a:b", "c:d" ]
->{ "a": "b", "c": "d" }
->[ "a:b", "c:d" ]
The text was updated successfully, but these errors were encountered: