chainapsis / keplr-wallet

The most powerful wallet for the Cosmos ecosystem and the Interchain
https://www.keplr.app
Other
774 stars 463 forks source link

Speedup Int-Pretty constructor and Clone() #1249

Open ValarDragon opened 3 days ago

ValarDragon commented 3 days ago

I found that the int pretty constructor ended up being a performance bottleneck in the Osmosis FE

This was due to our usage of Price pretty's, and every operation doing IntPretty clones.

This PR removes the Clone overhead, and removes many additional string operations + allocs from the constructor.

This was found to be a big speedup for Osmosis FE.

PR'd in case it helps you!