The redraw time can also depend on your video hardware. The base GPU for that model was the AMD Radeon Pro 570 with 4GB VRAM. Options were a Radeon Pro 575 with 4G VRAM, or the Radeon Pro 580 with 8GB VRAM.
My 2017 5K has the 4GB 575 option and 16GB RAM (8GB Apple; 8GB OWC). I seldom encounter redraw delays even on 3-60MB Photoshop (.psd) files..
VRAM is soldered to the logic board and cannot be upgraded. "About this Mac..." will show your video hardware config.
OWC's page for the 2017 iMac 5K: https://eshop.macsales.com/shop/memory/imac-2017-27-inch
IMHO, anything over 32GB RAM in that model overkill for the typical user. I thought I would go from 16 to 32 but have not needed more. Still happy with 16GB.
What storage option do you have? If you have Apple's Fusion Drive, it may be productive to post a system config report so we can see if it is underperforming. Fusion has proved less than perfect over time, so knowing your drive performance scores can help us decide if an SSD option would benefit you.
If you want a data-driven evaluation in this setting where we can neither see nor touch your computer, please post an EtreCheck report. We can quickly and within the limitations of these forums help you determine what issues are at play without our playing a protracted game of "20 Questions" with you that could go on for days.
EtreCheck Pro is available here:
https://etrecheck.com/index
The free version will do nicely for this purpose, although the app is worthy of our financial support.
We can see hard data about drive performance, software issues and interferences, and RAM usage. Etrecheck is the development of a long-serving and trusted ASC contributor. It is a reporting app, not a "fix-it” app, expressly for displaying information in these forums to help us help you remotely. It will not reveal any personal or secure information.
Please see this excellent user tip on how to post long text reports like EtreCheck's into a forum response:
How to use the Add Text Feature When Post… - Apple Community