Safari v18.2 History Memory Problem
My new M4 Mac Mini had been performing flawlessly until a couple of weeks ago. The 16GB system's free memory would hover around ~7GB during normal use with Mail, Safari, Messages and maybe one or two other programs/apps open. Suddenly it was rapidly dropping to ~2GB of free memory.
After some due diligence Activity Monitor showed that "com.apple.Safari.History" was using an inordinately high amount of memory; starting at about 15GB as soon as Safari is opened to as high as 60+GB and climbing. This was causing red-level memory pressure, heavy swap file usage, etc. The process remains open even an hour after closing Safari and it often continues to climb until I force quit it. Once it quits the free memory will instantly jump to ~10GB or higher.
So the culprit appears to be Safari v18.2. The process "overrun" happens immediately when Safari is opened, even without opening any tabs. No particular website triggers it either. The issue is replicated every time Safari is opened. It may be a memory leak, but I cannot isolate the cause.
Having used every type of Mac for more than a couple of decades I followed all of the known resolutions including reinstalling the MacOS Sequoia v15.2, removing the only single Safari extension installed (1Password), however the problem persists. I've searched the community without finding a similar issue, particularly with a new M4 Mac or the latest version of Safari.
As expected EtreCheck shows heavy app demand, memory demand, etc., again all pointing to Safari.
I've included a copy of Safari's open files and ports - with no tabs open - as well as a couple of screenshots showing the issue below in case that might help with a diagnosis.
In the meantime I've switched to using Firefox where there are no similar issues.
Safari is my preferred browser so any advice would be very welcome.
TIA!
=-=-=-=-=-=-=-=-=
/
/System/Volumes/Preboot/Cryptexes/App/usr/libexec/com.apple.Safari.History
/Library/Preferences/Logging/.plist-cache.dKFC7a0w
/System/Volumes/Preboot/Cryptexes/Incoming/OS/System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/Resources/en.lproj/Localizable.strings
/System/Volumes/Preboot/Cryptexes/Incoming/OS/System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/Resources/en.lproj/Localizable.stringsdict
/Users/redacted/Library/Safari/History.db-shm
/usr/lib/dyld
/private/var/folders/qz/kh4jrjrn2b7ffk0zdw9_2x9c0000gn/0/com.apple.LaunchServices.dv/com.apple.LaunchServices-6024-v2.csstore
/usr/share/icu/icudt74l.dat
/System/Library/Frameworks/CFNetwork.framework/Versions/A/Resources/DafsaData.bin
/dev/null
/dev/null
/dev/null
=-=-=-=-=-=-=-=-=
Memory usage history
Mac mini (M4)