Are you clearing the Graphics object between fills? If not, make sure you do so (this.graphics.clear), otherwise those fill rects will just stack up and up on top of each other.
EDIT:
Let me clarify after some investigation. With this clear(), the performance gets better with greater values for this._time.
With a value of 1 (setting it fix, but still calling updateBar()), it looks like in my first screenshot.
My guess would be that for some values, this intersectsPolygon() wreaks havoc.
I believe the issue here is that a rounded rectangle will create 4 'arcs' for each corner, which are created from lots of triangles all 'earcut' together. I guess the values are so overlapping it's just causing this function to freak out. We don't control earcut as it's a 3rd party library, so I think it may be better to use a rectangle with a 'rounded' mask over the top of it, to avoid it creating all of these triangles for the corners.
Version
Description
I created a time bar element that just consists of two rounded rectangles.
This function gets called every second, because

this._timegets updated every second.However, this is incredibly laggy:
When using just

fillRect, it's smooth:The text was updated successfully, but these errors were encountered: