On Sat, 28 Mar 2009, Hans-Peter Diettrich wrote:
> Michael Van Canneyt schrieb: > > > Is there a reason why ClipBoard.HasFormat() is so slow ? > > > > Putting a call to ClipBoard.HasFormat() in an OnUpdate handler of an action > > coupled to a toolbutton, seriously slows down an application, to the point > > of being unusable. If I comment out the call, the application responds > > normally. > > The request may go to the clipboard owner, which is responsible for > providing the clipboard contents in the various formats. The system also > may search for conversion tools, capable to render the desired format > from one of the supplied formats. > > This is on Linux (GTK1). I looked at the clipboard calls, but on the first > > look of things I see no reason why it should be so slow, except maybe the > > ClipboardGetFormats() call. > > I only know about the Windows clipboard, not on other systems. The > graphics system should not be involved on any platform. > > > The strange thing is that if something suitable is on the clipboard, > > the application responds normally. > > Isn't there a method EnumClipboardFormats, which should return only the > currently available formats? The HasFormat() function calls EnumClipboardFormats, among other things. I'll investigate how it behaves if I call EnumClipboardFormats directly. Michael. _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus