When I rewrote the XRXS Battle System, it started off very laggy because of the Gradient Bars.
The Gradient Bars were being drawn each and every frame, not when they changed. The method I came up with to fix it wasnt great, but was part of a learning process. What I did was only allow the bars to refresh or redraw if the Bars had changed at all. That was done in the update method. Check for any changes to the bars and refresh only as needed and as infrequently as possible.
General advice: Same thing goes with sprites in every scene. Put a print inside the Refresh method right around contents.clear to see how frequently Refresh is being called. Every frame, or only when a change is made? print "Refreshing ", @event_id Its annoying to be "Refresh Messaged", but gives a better idea where the engine is struggling.