Code splitting is a standard technique in react to reduce the size of the main bundle by separating the main bundle into multiple smaller bundles. It can improve the time to render of a web page.
In Cashtab right now, the main bottlenecks for load times are
- getting the best chronik server
- Waiting to sync with the wallet's latest utxo set
It would be possible to do some of these in the background, but will take some iteration and techniques. We used to load without the spinner while the wallet utxo set loaded, but in practice this led to many users getting utxo errors, since lots of people load cashtab for the purpose of immediately sending a tx.
Will work on those bottlenecks. But, this is a general best practice we "should" do. Running some tests on Lighthouse, seems to get a slightly better score. The values chosen here were selected by AI and are in line with defaults. There is probably room for further optimization, but since this is not close to the biggest bottleneck on load time, it's hard to test that at this point.