processOrderbookData is taking ~20ms for auctionId=21 in rinkeby, this could be taking much more with a lot of bids. And runs every time the user change the price amount.
To improve this is necessary to make some unit testing for the function and his auxiliary functions too. And then find the bottleneck to try to find a faster way to do the same calculations.
processOrderbookData
is taking ~20ms forauctionId=21
in rinkeby, this could be taking much more with a lot of bids. And runs every time the user change the price amount.To improve this is necessary to make some unit testing for the function and his auxiliary functions too. And then find the bottleneck to try to find a faster way to do the same calculations.