How to fix the unresponsive macOS CursorUIViewService process consuming excessive RAM

This is a long-standing macOS bug: when a third-party application triggers an update to the input method indicator state of CursorUIViewService, it causes a memory leak.

You can disable the input method indicator for CursorUIViewService using the following command (which will immediately restart the system):

However, disabling CursorUIViewService will remove many animation effects; decide whether to disable it based on your needs.

sudo mkdir -p /Library/Preferences/FeatureFlags/Domain && sudo /usr/libexec/PlistBuddy -c "Add 'redesigned_text_cursor:Enabled' bool false" /Library/Preferences/FeatureFlags/Domain/UIKit.plist && sudo shutdown -r now

Reference