Would it be possible if the raw materials tab in hovermenu of the character inventory gets cached after calculating it once.
When I was playing modded factorio it made the framerate drop significantly.
For example: when this hovermenu is opened, the framerate drops from 60 to 15 on my pc.