I see that the Messages application on your iMac has slowed down considerably since upgrading to macOS Mojave. I'm happy to help.
Use safe mode to isolate issues with your Mac -- Restart your Mac in safe mode and test how Messages responds. Afterwards, reboot normally and log into your own user account and test the issue again. Remember this when booting in safe mode: Graphics performance limited in macOS Recovery, safe mode, or Guest User mode
How to test an issue in another user account on your Mac -- If the issue is also happening in safe mode, use this article to create and test a new user account. This will demonstrate if the issue is isolated to your account, or if its system wide. You'll need to set up Messages in this new user account in order to test.
Let me know how that goes, and take care!