Large memory usage

I've been watching my memory usage to determine what I need for my new M2 MacBook.

I noticed that keyboard maestro was using a gigabyte of memory. I traced it down to the clipboard history feature.

I'm using Filemaker to scrape some data off a website. I create about 200 records a day with this. I'm not using Keyboard Maestro to do any of the work. I am running a small AppleScript … otherwise it's all within Filemaker.

I didn't see any commands to “hold or pause" this feature. It seems all I can do is exclude Filemaker as an app in the preferences, which seems like pretty big overkill to me.

I guess I'd like to see a command that says stop the clipboard from writing to the history file.

I could be missing something… Let me know if there is such a command, otherwise, I'll simply choose Filemaker to be excluded from this feature.



Are you using the find image on the screen facility? There is a memory leak related to that that can build up over time (faster the more you use the facility obvious) which is resolved for the next version.

1 Like

Can we have a countdown to the next version when
Appropriate?I am HYPED

1 Like

No I am not using the find image on the screen facility.
I'm using the "WebViewer" feature in Filemaker. It is a feature where I can view a webpage from within Filemaker. I'm using no part of Keyboard Maestro for this process.
I am simply going to a specific record in Filemaker, viewing that website, copying the text in that "WebViewer" and pasted it into a field in FileMaker, then I am doing a bunch of text parsing in Filemaker. I'm doing that process to about 200 records each day. There is quite a bit of text I'm copying for each of the 200 records (about 10,000 characters for each record).

Well if you can nail it down to a specific action that is causing the increase in memory, that would definitely improve the chances that I can figure out what is leaking.

I'm not sure how to answer that. From what I can tell, there's no specific action. The way I see it, it's more of a "process" that I'm doing.
Essentially, I'm doing a copy and paste 200 times in an hour. Each copy and paste involves 10,000 characters.
During that process I can watch the Keyboard Maestro Engine increase in the Activity Monitor.
With what I read about the clipboard history feature in Keyboard Maestro, the increase in memory makes sense to me.
I was just thinking of having a feature where I could stop keyboard Maestro from writing to the history during that process, rather than exclude Filemaker from that clipboard history feature in preferences.
Does that help?

So you have a process involving only FileMaker.

Is that in FileMaker too?

Just so it is clear: while watching your FileMaker process in Activity Monitor, you noticed that KM’s memory usage was also increasing/large - even though KM is not directly involved at all with what FileMaker is doing. So you’ve concluded that as a side-effect of the clipboard usage of your FileMaker process, KM’s memory usage is ballooning (through its maintaining of its clipboard history).

If in fact that summary is not accurate and actually KM is directly involved somehow with your FileMaker process you should post the KM macro.

I’m just trying to make sure the forum understands the issue…

1 Like

A bandaid solution might be temporarily disabling the Keyboard Maestro Clipboard History by disabling/reenabling it in the command line. See the command line clipboard section in this Wiki article for more info if you are interested in doing that. This is obviously a bandaid, not a solution, though it might help to identify whether or not the KM clipboard management is indeed the culprit.


The Clipboard History contains only 200 items (by default) so it will not continue to expand without bounds.

Is this using a macro, or just manually copying and pasting text?

It is not a Keyboard Maestro macro, nor is it manually copied & pasted.
Filemaker has a scripting engine. I'm using that engine to do the copying pasting.
For this process, I have quit the Keyboard Maestro application & engine and the scripting process works normally, indicating to me that keyboard maestro is out of the loop.

Thanks Chris.
I have found that in the Keyboard Maestro preferences I can simply choose Filemaker (or any other application) to be omitted from the clipboard history feature. I've use that now and it prevents the Keyboard Maestro Engine from using more memory.

1 Like

For the AppleScript part of this…
Filemaker has an internal scripting engine that I use. Unfortunately, you can't access the Filemaker menus from it. What I'm doing is going to a Filemaker web viewer that shows me a specific website and then selecting the contents of that website from the web viewer, copying all the text, and then pasting it into a field in Filemaker.
Here's the AppleScript, I'm using to access the FileMaker commands in need:
tell application "System Events"
key down {command}
keystroke "a"
key up {command}
key down {command}
keystroke "c"
key up {command}
end tell

Thanks for clarifying Tom. I think you’ve pretty much covered everything with this and last couple of posts. Sounds like excluding FM from the clipboard history in this case is the way to go.

Hmm, ok, it sounds like maybe there is some sort of memory leak when copying to the clipboard history. I'll see if I can duplicate that. Maybe it's only visible when there are frequent or continuous copies, or maybe it is related to FileMaker somehow (I hope not as I wont be able to duplicate it then, although also then it wont affect many people which is less bad).

Ya, could just be a "weird" thing associated with Filemaker. I do get it, this isn't something a user would do, but it is automation.
Also for your testing purposes…I'm grabbing about 10,000 characters for each of the 200 copy & pastes ... .

1 Like

What macos do you have?

There are a lot of reports of "Large memory usage safari ventura macos - Google Search" up to 50GB!!, myself I had certain (dynamic content) webpages with 15GB.

It may be a Ventura bug, which also affects other processes, someone knows better.