We've refractored the way SteemPlus launches to make it faster. This change will not be very obvious if you have a very good connection and the blockchain is very stable. This is what we get today without changes (my connection is quite slow):
And after the changes :
So, we've gained an incredible 0.3s on launch! Not that incredible? Indeed, but few days ago, when we've started coding that, the blockchain was slow as hell and the difference was a staggering 5 seconds. You'll have to believe me, I didn't take screenshots at that time ;p
New Features
As said previously, we've implemented a new launch system in order to save time.
Let's compare the flows in both implementations.
Before
- Check all info needed from blockchain with simultaneous asynchronous calls
- Then, log into SteemConnect
- Then, get local variables
- Start the various services
Now
The 3 seconds on my slow connection are mostly due to 2) log into SteemConnect
To save time in case of slow blockchain answer, we launch 1) and 2) simultaneously. If 1) finish first, it all goes as usual. If 2) finishes first, the features start with the last known value of the variables (stored locally), and are then updated with the new fresh values by a system of callback.
Additional notes
SteemPlus won't start until Steemit/Busy/Utopian is done loading, because your browser can only handle a given number of asynchronous requests in the same time. So, now the waiting time you will get will be caused by :
- Platform loading its data before SteemPlus
- SteemConnect authentication
Hope you'll appreciate the difference during slow blockchain days ;)
Posted on Utopian.io - Rewarding Open Source Contributors