curvefi / curve-js

MIT License
64 stars 38 forks source link

perf: avoid initializing ethers contracts during construction #388

Closed DanielSchiavini closed 2 months ago

DanielSchiavini commented 2 months ago
DanielSchiavini commented 2 months ago

Notice how the defineProperties takes a lot of CPU time (40% in this case) because it repeats a lot! image

DanielSchiavini commented 2 months ago

Now after my changes, the bottleneck is gone image

DanielSchiavini commented 2 months ago

Rebased in #390 due to unsigned commits in the merge