Performance Clipboard History

I have noticed that Clipboard History has a performance problem. I normally trigger the Clipboard History with a hot key and initially the response is immediate. However over time the response gets worse. Earlier today it took about 20 seconds for the window to show.

When I check the history window I can see that is has the maximum number of entries being 200.

I did remove all the named clipboards and that did not help to solve the performance problem.

My solution now, is that I completely kill Keyboard Maestro (including the engine) after which the history is reduced to 1 entry. At that moment the response is instant again.

Given that 200 entries is the default maximum, I would not expect that this is an issue and that Keyboard Maestro would not be able to handle that many entries.

Any suggestions?

That in itself sounds a little suspicious -- clipboard history usually persists across Engine, even computer, restarts. What versions of KM and macOS are you on?

You could try reducing the maximum number. The command can be found in the Preferences Set by Command Line section of the manual but, for completeness, this will change it to 50:

defaults write com.stairways.keyboardmaestro.engine MaxClipboardHistory -int 50

(You might have to quit and relaunch the Engine for this to take effect.)

KM version is 10.2
MacOS version is Monterey 12.6

I am aware of how I can reduce the #entries. I am not doing this yet.

As for the suspicion. I have not enabled the option 'Save Clipboard History Between Launches'. This explains (I think) why I only see 1 entry after relaunch.

I just enabled that so that I can see if the performance is normal on a relaunch.

At the moment I have 89 entries in the history and the popup shows after a short period (my estimate is 0.5 seconds but I'm not sure how exact my estimate is :grinning:).

1 Like

Named clipboards are completely separate from the clipboard history.

What sort of stuff are you copying?

Many large graphics or other data-hogs can cause the KMHS to slow way down.

When it gets sluggish try deleting items from it – some or all – and see how that affects its performance.

By removing all the named clipboards, I was trying to remove as much influence as possible. What I am copying will vary from day to day. Sometimes this is graphics, sometimes this is code and sometimes it will be a mix.
As you suggest, next time it is sluggish I will inspect and look for large graphics and delete them individually to see if that is the root cause or not.

1 Like

The named clipboards are in an entirely separate database from the clipboard history: