Mac has become insanely slow : Processes SystemUIServer, UserEventAgent and loginwindow using a lot of memory
First of all: High Memory-Usage is not a bad thing in itself - the goal is to have a performant system and it can accomplish that by using RAM. 

That you Mac slows down is more likely a problem that a process or an App is hogging Memory and not correctly releasing it, forcing the system to use Swap-Memory (on your Harddrive) and thereby slowing your system down, but that is just one possible scenario.

I think it is necessary to differentiate that because i think you are looking at the wrong place for your problem. 

Other Possibilities could be wrong File Permissions, I/O errors of your Harddrive or SSD, timout issues for some process or App (Google Drive, Dropbox etc), corrupted chaches or swap files. 

You should:


check the CPU-Usage in the 'Activity Monitor.app' Is there a Process/App that is using up your CPU and slowing your system?
Check the 'Console.app' in /Applications/Utilities/ for errors and post them here. There might be some clues there, f.e. read/write errors, timeout issues etc.
It is always a good idea use 'Disk Utility.app' in /Applications/Utilities to check your HD/SSD with 'Verify Disk' and after that checking the File-Permissions with 'Verify Disk Permissions'. If you find some errors there you should use the 'Repair' Function.
try booting your system in 'safe mode' by holding the shift key on startup. Can you reproduce the problem in that mode? 


Try that and post your findings.