This apples to the OpenGL canvas and is something I've been playing around with ever since it became that increasing the texture size was not an option and I had seen some time spent inside paintGL on an iMac. It's still experimental, but it looks quite promising to me.
The idea is: do not draw all tiles every frame, but only draw those tiles that actually changed. Since we're usually in a double buffer GL context, this needs an FBO to accumulate the incremental changes. The benefit of this is that the paintGL does get faster as it has much less work to do and the final FBO blit to the actual GL buffer is blazingly fast.
From what I measure, here on my MacBook Pro 2017 (Intel Iris Plus Graphics 650 1536 MB), when turning this on and drawing using a pen on a 4000 x 4000 canvas, the time spent inside renderCanvasGL goes to 10% as to what it was before.
Here are some number; the first bool indicates whether fbo incremental updates are in place, the second time is in microseconds (i.e. 1/1000 ms). So it goes from rougly 1 ms to rougly 1/10 ms, which, for 100 frames per second, would mean reducing the total time spent here from 100 ms to 10 ms.
no fbo
paintGL false 670
paintGL false 757
paintGL false 1074
paintGL false 1293
paintGL false 701
paintGL false 1052
paintGL false 645
paintGL false 1154
paintGL false 1465
paintGL false 1919
paintGL false 780
paintGL false 736
paintGL false 627
paintGL false 908
paintGL false 617
paintGL false 824
paintGL false 617
paintGL false 935
paintGL false 663
paintGL false 637
paintGL false 653
paintGL false 1174
paintGL false 633
paintGL false 915
paintGL false 661
paintGL false 797
paintGL false 618
paintGL false 802
paintGL false 785
paintGL false 1456
paintGL false 1198
paintGL false 869
paintGL false 669
paintGL false 988
paintGL false 736
paintGL false 661
paintGL false 668
paintGL false 1054
paintGL false 961
paintGL false 882
paintGL false 869
paintGL false 632
paintGL false 1220
paintGL false 685
paintGL false 653
paintGL false 711
paintGL false 1328
paintGL false 954
paintGL false 1025
paintGL false 17349
paintGL false 674
paintGL false 793
paintGL false 683
with fbo
paintGL true 137
paintGL true 78
paintGL true 236
paintGL true 149
paintGL true 84
paintGL true 67
paintGL true 149
paintGL true 91
paintGL true 151
paintGL true 70
paintGL true 77
paintGL true 35
paintGL true 68
paintGL true 74
paintGL true 58
paintGL true 60
paintGL true 43
paintGL true 71
paintGL true 39
paintGL true 66
paintGL true 126
paintGL true 53
paintGL true 67
paintGL true 69
paintGL true 79
paintGL true 65
paintGL true 67
paintGL true 94
paintGL true 106
paintGL true 75
paintGL true 133
paintGL true 76