I’m having a similar issue. I realize this on my previous iMac 5k (late 2015, i5 3.2ghz, 16gb ram, 2gb vram, ssd). Now, using on newer iMac 4k (2017, i5 3.4ghz, 8gb ram, 4gb vram, fusiondrive) I still having a little bit laggy on a 3d viewing, that going decreasing more and more with OpnGL view and switching on the shadows and illumination settings.
tell me what is your Mac model/specs.?