This attempts to speed up the interface showing up when new recipe lines are added.
The first commit delay rendering of the tooltips until mouseover
The second commit caches the call to getImage for each ingredient
In my test case (vanilla factorio, 61 white science per minute, press + to add 5 red circuit/min, then remove those 5 red circuit/min), there is an improvement when the tooltips are enabled:
adding red circuits : 2.20s in the parent commit, 0.87s after these
removing red circuits : 0.93s in the parent commit, 0.72s after
(averaged on 4 measures each in firefox 80.0 win64)
Hello,
This attempts to speed up the interface showing up when new recipe lines are added.
In my test case (vanilla factorio, 61 white science per minute, press + to add 5 red circuit/min, then remove those 5 red circuit/min), there is an improvement when the tooltips are enabled:
(averaged on 4 measures each in firefox 80.0 win64)