Hi.
I've been suffering for a long time with Evergreen being rather slow at redrawing under certain conditions. I've finally figured out two root causes.
The particular condition under which the speed really sucks is if there are lots of spelling mistakes on the screen, and 'find' is active and there are several highlighted matches on the screen. Under such conditions, simply typing causes horrible slowness.
This is down to two things.
Thing one: when 'find in files' is active, every keypress triggers all the find matches to be dropped and recalculated. This essentially causes the entire editor pane to be redrawn. So that's a complete redraw for every keypress - bad. Particularly on a 4k monitor with one file vertically maximised.
Thing two: the redraw speed for those little wiggly lines absolutely sucks. It's implemented by a long series of 2.84-pixel-long lines, with anti-aliasing enabled.
I've so far tackled thing 2: by pre-generating a BufferedImage with 100 pixels of wiggly line, redraw speed improves by a huge amount. Redrawing a screen-full of spelling mistakes on my BSD machine took 0.07s instead of 4.5s; the speed-up when I tried it on a laptop was a factor of 370.
However, it may be worth tackling thing 1 as well. It seems crazy to force a complete repaint of everything for every keypress. My suggestion would be, instead of clearing the highlights and then recalculating them, to calculate the new highlights, then compare them against the existing ones, only replacing those that have changed.
Cheers,
Phil