Exceptionally slow drawing performance in GIMP 2.10.4 compared to 2.8.16
In gimp 2.10.4 the largest brush size I can draw without noticeable stutter is around 30 pixels. (Brush use: "Hardness 050" a stock brush that is part of the installation of GPIM)
In gimp 2.8.16 the same brush can be used at a 2000 pixel diameter before reaching noticeable stutter. Spacing is 10 pixels in both cases. Exact limits before stutter is though dependent on the computer, mine being a I5-3350P with 32 GB of RAM. Image size being 7680 x 4320 pixels.
This is roughly 0.02% of the speed. (Gimp 2.8.16 is 4400 times faster. So something is clearly not correctly implemented.)
That gimp 2.10.4 is very new is likely a good reason for this poor performance, but I would also look at how canvas rotation is implemented. I haven't checked the actual code. But given the stutter and laggy response of simply rotating the canvas, seems like a good indication that it isn't "properly" implemented, and can be a root cause for why the drawing tools are slow as well.
Since canvas rotation doesn't require any special treatment during image processing and drawing, it only needs the input (Where one is drawing) and final rendering (What gets shown to the screen) being rotated before being presented to each part of the processing chain.
Simply stated, one first needs to un-rotate the inputs, process the image editing/drawing, then render the new image, then rotate that image to fit the GUI again.
But it feels like the underlying code does far more then that. Like rendering a rotated view, when a non rotated view would have done just fine and leave the rotating of it to the GUI post rendering. (Yes, if we render a square that fits the rotated canvas, then we will in an un-optimized scenario render more pixels then we would have done if we consider the rotation during our render, but the later is though likely far heavier from a processing standpoint. Not that it is hard to check if a block of pixels would fall outside our area of interest, so this would be fairly easy to optimize.)
How all this ties back to drawing is simply by the fact that each time the drawing tools makes a change to the image, we are re-rendering the view for the GUI. (And if the rendering is poorly implemented then we can expect stuttering and slow drawing as well.)