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
I feel like there are a lot places where we can either recycle objects or just not allocate at all. One quick actionable item is to remove any POJO arguments e.g.
new Foo({ bar: 'bar', baz: 1 });
These are typically short lived objects that need to be GCd since all we typically do is peel them off in the constructor. Possibly run into this issue in hot paths. To make this a bit more palatable you can write the arguments to a constructor like this.
Since we have types getting argument position correct is less of an issue. Typically if there are more than 4 args to a class there is likely another object in there hiding.
The text was updated successfully, but these errors were encountered:
I feel like there are a lot places where we can either recycle objects or just not allocate at all. One quick actionable item is to remove any POJO arguments e.g.
These are typically short lived objects that need to be GCd since all we typically do is peel them off in the constructor. Possibly run into this issue in hot paths. To make this a bit more palatable you can write the arguments to a constructor like this.
This is equivalent to the following:
Since we have types getting argument position correct is less of an issue. Typically if there are more than 4 args to a class there is likely another object in there hiding.
The text was updated successfully, but these errors were encountered: