Remove "Send to" entries from Ksnapshot

Duncan 1i5t5.duncan at cox.net
Tue Jun 26 03:01:12 BST 2012


Felix Miata posted on Mon, 25 Jun 2012 04:32:39 -0400 as excerpted:

> Re: https://bugs.kde.org/show_bug.cgi?id=287663
> 
> I don't see any such thing as "send to" or "export to" in 4.8.4 on
> openSUSE.
> Where is it hiding?
> 
> Could the slowness have some relationship to
> https://bugs.kde.org/show_bug.cgi?id=283366 ?

If you run ksnapshot, there's no send-to button at the bottom of the
resulting window?

With normal behavior, it'll immediately take a snapshot (the default is of
the entire desktop, but there's command-line options to enable window-
only, etc, if needed), then popup a dialog window with a thumbnail version
of the image at the top, a button underneath it that allows taking another
snapshot, a capture-mode button (screen, desktop, window,
specified-region, etc), a delay spinbox, and a couple checkboxes to toggle
inclusion of window decorations and mouse pointer in the screenshot, or
not.

Below those, which are laid out in a single column one below the other,
are four buttons in a single row, the left two of which replace and popup
menus if clicked.  On the far left there's the help button, which pops up
the usual help menu with about dialogs and handbook entries.  Middle left
is the send-to button/menu under discussion.  Middle right is a copy
button, which copies the snapshot to the clipboard for pasting into an
editor/viewer.  And far right is the save-as button, which opens the save-
as dialog in ordered to allow selecting the format and filename to save
the snapshot image.

Meanwhile, back to the send-to button/menu.  There's two types of entries
in this menu.  At the top are the entries corresponding to applications
registered as image editors/viewers in file associations, to allow sending
the snapshot to them.  (This corresponds to the open-with submenu found in
the context menu for normal images.)

Below that, if you have kipi-plugins installed, are a whole slew of
export-
to entries, mostly for websites such as facebook, picasaweb, flickr, etc.

And it's this last set that I believe is the problem, since these plugins
come in the form of shared-object libraries that may or may not be
installed, and thus aren't hard-linked at build-time, but rather, use
dlopen's "late binding" mechanism to load dynamically when triggered at
run-time.  Scanning for and loading these takes quite a lot of time, which
wouldn't be much of a problem for a normal app, since it would likely do
it at initialization.  But ksnapshot is supposed to take a snapshot and
then popup this dialog right away, so it doesn't load these plugins at
init, but instead, waits for the click of the send-to button to load them,
but then it must do so before it can populate the send-to menu.

That load process takes several seconds, even after doing it once so the
plugins are actually cached in memory, no disk access required.
What's MORE frustrating is that it takes this EVERY time the button is
clicked.  Computers USED to be slow enough that people sort of expected to
wait for menus to show up sometimes, but these days,
computers tend to be fast enough that people actually run various
animation effects and slow things down so they're not so abrupt.
But that does NOT mean waiting four-plus seconds for a menu, which is what
this one is taking for both me and the original poster.
Four seconds menu latency gets REALLY annoying, when you're used to say 50
milliseconds or so.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list