Perf: cache metrics id and entity id (#7201)
There are a lot of calls to `Metrics.id()` and `ISource.getEntityId`, which calculates the id by manipulating strings in every single call, producing many garbage objects. In this patch, I cache the id and only calculate the id if it's requested for the first time.
Showing
想要评论请 注册 或 登录