copy-selected-tabs-to-clipboard
copy-selected-tabs-to-clipboard copied to clipboard
Very slow to paste clipboard contents
Short description
Extension is very slow to paste formatted URL
Steps to reproduce
- Start Firefox with clean profile.
- Install MTH version 3.1.11
- Define custom format - see below. Edit. It is slow even with default formats.
- Copy a URL to clipboard
- Paste it.
This is my custom format meant to be used at https://pubmed.ncbi.nlm.nih.gov/
[\(AUTHOR YEAR\)][%REPLACE("%URL%", ".*pubmed.ncbi.nlm.nih.gov/(\d+)/", "$1")%]%EOL%[%REPLACE("%URL%", ".*pubmed.ncbi.nlm.nih.gov/(\d+)/", "$1")%]: %URL% (%MD_LINK_TITLE_SAFE(%TITLE%)%)
Expected result
Text is pasted nearly instantly.
Actual result
It requires 10 to 13 seconds before the clipboard contents are pasted (and my desktop environment becomes unresponsive). BTW, I'm working on a fast desktop computer with lots of RAM, etc.
I use the extension's menu to copy the URL. Then I use CTRL-v to paste it. After entering CTRL-v, there is a delay of 10+ seconds where nothing happens and my system appears non-responsive. After that delay, I get a desktop popup notification (in KDE) and the item is pasted from the clipboard.
I do not have any slowness or non-responsive at any other time from any other applications.
Here's an example:
[\(AUTHOR YEAR\)][28728020]
[28728020]: https://pubmed.ncbi.nlm.nih.gov/28728020/ (Neuroscience-Inspired Artificial Intelligence - PubMed)
The first time I tested this extension, I installed it to a clean FF profile and copy/pasted the markdown format. No problems. Then I defined my custom format and it was slow (as I had seen on my regular Firefox profile).
However, when I went back and tested the standard markdown format, it was very slow now too. I reverted my changes and it remained slow.
BTW, side question, does anyone know if I can automatically capture the citation authors and publication date? This info is in the meta data:
<meta name="citation_authors" content="Hassabis D;Kumaran D;Summerfield C;Botvinick M;">
Environment
- Platform (OS): Arch Linux
- Version of Firefox: 107.0.1 (64-bit)
- Version (or revision) of Multiple Tab Handler: 3.1.11
I've tried it on Firefox 107 on Windows 10 with URLs:
https://pubmed.ncbi.nlm.nih.gov/28728020/
https://pubmed.ncbi.nlm.nih.gov/26185246/
https://pubmed.ncbi.nlm.nih.gov/34649035/
https://pubmed.ncbi.nlm.nih.gov/19386468/
https://pubmed.ncbi.nlm.nih.gov/28826509/
and I got a copied text immediately:
[\(AUTHOR YEAR\)][28728020]
[28728020]: https://pubmed.ncbi.nlm.nih.gov/28728020/ (Neuroscience-Inspired Artificial Intelligence - PubMed)
[\(AUTHOR YEAR\)][26185246]
[26185246]: https://pubmed.ncbi.nlm.nih.gov/26185246/ (Computational rationality: A converging paradigm for intelligence in brains, minds, and machines - PubMed)
[\(AUTHOR YEAR\)][34649035]
[34649035]: https://pubmed.ncbi.nlm.nih.gov/34649035/ (Natural and Artificial Intelligence: A brief introduction to the interplay between AI and neuroscience research - PubMed)
[\(AUTHOR YEAR\)][19386468]
[19386468]: https://pubmed.ncbi.nlm.nih.gov/19386468/ (Intelligence in the brain: a theory of how it works and how to build it - PubMed)
[\(AUTHOR YEAR\)][28826509]
[28826509]: https://pubmed.ncbi.nlm.nih.gov/28826509/ (Infrastructural intelligence: Contemporary entanglements between neuroscience and AI - PubMed)
Could you try with formats containing less placeholders by removing each placeholder step by step?
And, if you see the problem with old Firefox like Firefox ESR91, could you collect performance profile? Here is a document for my another addon: https://github.com/piroor/treestyletab/wiki/How-to-inspect-tree-of-tabs#how-to-collect-a-performance-profile but the method is unavailable on recent versions of Firefox due to disabled performance profiler for addons. Firefox ESR91 is a version with available performance profiler for addons.
Thank you for replying. I did test it further and the "copy-selected-tabs-to-clipboard" extension is slow for me with any format, including the default ones (like title & url).
I found that I consistently get these entries in the journal every time I copy a new url with the extension and then paste it.
Dec 04 15:46:07 laptop plasmashell[3636]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55d62b9b8890) QQmlContext(0x55d626b7d6b0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Dec 04 15:46:07 laptop plasmashell[3636]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55d62b9b8890) QQmlContext(0x55d626b7d6b0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Dec 04 15:46:07 laptop plasmashell[3636]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
Dec 04 15:46:07 laptop plasmashell[3636]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
Dec 04 15:46:07 laptop plasmashell[3636]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitHeight"
Dec 04 15:46:07 laptop plasmashell[3636]: file:///usr/lib/qt/qml/org/kde/plasma/components.3/ScrollView.qml:45:27: QML ScrollBar: Binding loop detected for property "visible"
Dec 04 15:46:07 laptop plasmashell[3636]: file:///usr/lib/qt/qml/org/kde/plasma/components.3/ScrollView.qml:45:27: QML ScrollBar: Binding loop detected for property "visible"
It is possible this is a KDE-specific problem. All those mentioned files exist on my system. I'm on plasmashell version 5.26.4. Maybe it is a bug.
FWIW, I can confirm that I also use Firefox under Linux and KDE and experience the same issue, although I use the extension sparingly so it's just a minor annoyance and not a big deal. Happy to help investigate if there's anything I should check.
A minor wrinkle: the issue occurs often, but not always; sometimes it's instant. I don't have a clear sense of what makes the difference, though it miiiight be related to whether it's the first or Nth invocation (in a given period of time?), which would also happen to track with @MountainX's original report. (But again, this is just a vague, low-confidence intuition.)
Same, also using KDE + Firefox. I removed the option to show a notification just now, and after a couple of tests, it seems that resolves the issue.
Seems to have something to do with the notification server.
I also seem to have trouble with this extension. I'm running i3 on Arch (all latest versions, including FF at 124) and below I have included a screenshot of about:performance after I triggered the extension and the notification (that I configured to show up) hasn't shown yet. You can see high usage of cpu on the core and the extensions process while the extensions process also accumulates a lot of memory.
I then disabled the setting to send the notification, proceeded to copy the ~20 tab urls manually and closed them (as well as the entire separate window). Afterwards, my clipboard was filled with the list of tabs I requested to copy before, the cpu usage was down to basically 0% and the Extensions' RAM usage is back to ~200MB.
I'll see if this continues to show up with the option disabled.