Clipboard History switcher

Hi

I really love the Clipboard History Switcher.
But sometimes it takes 10 seconds to appear.
I am pretty sure it is because some items are quite big in size. Seems to be if I copy from Excel.
Because if I clear the history, then it launches very quickly.

Does anybody has a way to only clear items over a certain size?

@peternlewis: If this is not expected behaviour I will gladly send you information to troubleshoot this.

I’ve never seen 10 second delays with KM’s clipboard history, but I have noticed a consistent lag in opening it after several dozen items or so have been copied. I still use KM’s clipboard history for some things because of its rich feature set, but I’ve ended up sticking with a clipboard manager I’ve been using for a couple of years now, Copied (https://copiedapp.com/) as my primary. I’ve tried several clipboard managers over the years, and Copied has always been instantaneous to open no matter how many items are in its history or how big the data is (plus it has an iOS counterpart that it syncs with via iCloud, which is really nice).

Yes, if you have large clipboards in your clipboard history, it can result in a lag opening it.

Eventually I plan to resolve that, but it hasn’t been resolved yet.

2 Likes

Thanks for the feedback.

Is there a way to use KM to look at the size of an entry in the clipboard switcher?

Then I could make a macro to delete items over a certain size.

Hey Jimmy,

Pretty sure not — at least in a way that’s convenient.

Currently I think the only viable method would be to read the Keyboard Maestro Clipboard History.plist file and calculate the sizes of the bits.

-Chris

Thanks. Maybe not worth the hassle if Peter implements something in the future.
Also because I do not know how to read the plist file and do something with it. :slight_smile:

Not enough coffee this morning - wrote a script to find the largest macro :slight_smile:

I agree with @ccstone, no obvious Q&D route to sizing the clipboards.

1 Like

:coffee:

Thanks for trying.

:coffee:

The Clipboard History switcher shows the size of the items in the info about the items, though it is only an approximation since it shows the size of the largest clipboard flavor, not the total size of the clipboard entry. But it should still be well correlated to lag.

Thanks @peternlewis.

I will investigate next time the lag is there, which clipboard entry is the big one.

I can now see that the culprit is Excel.
It seems to also create a big image of the data I copy. And since I am working with address list with maybe 40.000 recipients these image become quite large, as you can see from below.

I have tried to exclude Excel in the preferences for the clipboard history, but it still creates entries in the switcher.

Hmm. As a workaround, what about an Excel-only macro that automatically filters new clipboard entries to remove styles and then deletes Past Clipboard 1? Maybe something like this in an Excel-only macro group?

Auto-Filter Excel Clipboard.kmmacros (2.9 KB)

Hi gglick

Thank for this. It seems to solve it when in Excel.

Though Excel has this weird behaviour with setting the clipboard again when switching away from the program.
So I have also copied your macro to my Global Group and set it to trigger when Excel deactivates.

1 Like

And I think the lag is based on the images from Excel. Not the data.
Because with this macro, then text data from Excel is still 12 MB but without the images the Clipboard History Switcher activates without a lag.

Interesting. As I said above, KM’s clipboard switcher activates quickly for me when the history is empty, such as when the engine has just started, but slows down to a short, but noticeable, lag once it has a few dozen entries or so, regardless of the size of any individual entry.

This issue has cropped up again.

Sometimes the remove styles is not optimal as I get returns instead of tabs between the data columns.

I have now noticed a process called Pictd spinning up when I activate the Clipboard Switcher.
See this video: https://d.pr/v/3NLV0t

Do not know if this is a macOS thing or Keyboard Maestro. But it seems to be this which slows down the apperance of the clipboard switcher. Probably because it needs to generate the previews.

@peternlewis: Is it possible to disable the preview of image data in the clipboard Switcher?

No.

I have plans to lazily render the images which should resolve the issue, but I don’t know when they will happen.

1 Like

OK. I will try to see if I could find a work around until this happens.

Not over a certain size, but to clear all:

Thanks for the suggestion. I have already a macro for this since I also found that it fixed the issue.