[Linux] Redundant nsClipboard::HasDataMatchingFlavors() calls
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox99 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
For simple text paste we perform eight calls of nsClipboard::HasDataMatchingFlavors(). We need to optimize that as HasDataMatchingFlavors() is expensive call on Linux as we spin internal event loop.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
nsClipboard::HasDataMatchingFlavors() calls nsRetrievalContext::GetTargets() which obtains clipboard targets. We need to call Gtk code for that and spin evetn loop to get the targets.
In this patch we store clipboard tragets internally to speed up nsClipboard::HasDataMatchingFlavors() calls. We also listen at owner-change signal to clear target cache when clipboard content changes.
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
| Assignee | ||
Comment 3•4 years ago
|
||
Comment 5•4 years ago
|
||
| bugherder | ||
Comment 6•4 years ago
|
||
Backed out for breaking certain combinations of tests.
Backout link: https://hg.mozilla.org/integration/autoland/rev/0224b58f6c858dfa448501c384deb0bed9e498f6
Failure log: https://treeherder.mozilla.org/logviewer?job_id=360110583&repo=autoland&lineNumber=3742
Comment 7•4 years ago
|
||
The failure mentioned in comment 6 appeared after the test manifests (similar to folders) got automatically reorganized but adding the failing combination to previous pushes ("backfilling") showed the issue started with the change from this bug.
Comment 8•4 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/0224b58f6c858dfa448501c384deb0bed9e498f6
| Assignee | ||
Comment 9•4 years ago
|
||
Okay, let's wait to 97 cycle with it.
Comment 10•4 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:stransky, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
| Assignee | ||
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
Backed out for causing mochitest failures in test_pasteImgTextarea
Backout link: https://hg.mozilla.org/integration/autoland/rev/c543d1128430790627cb6fc9848e9f66c25daa67
INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_pasteImgTextarea.xhtml | paste should not be enabled in xul textareas when an image is on the clipboard - got true, expected false
[task 2021-12-22T22:46:38.330Z] 22:46:38 INFO - SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:500:14
[task 2021-12-22T22:46:38.330Z] 22:46:38 INFO - @chrome://mochitests/content/chrome/editor/libeditor/tests/test_pasteImgTextarea.xhtml:22:11
[task 2021-12-22T22:46:38.330Z] 22:46:38 INFO - add_task | Leaving test
[task 2021-12-22T22:46:38.330Z] 22:46:38 INFO - GECKO(2994) | MEMORY STAT | vsize 27687MB | residentFast 480MB | heapAllocated 207MB
[task 2021-12-22T22:46:38.330Z] 22:46:38 INFO - TEST-OK | editor/libeditor/tests/test_pasteImgTextarea.xhtml | took 152ms
| Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Comment 15•4 years ago
|
||
nsClipboard::HasDataMatchingFlavors() calls nsRetrievalContext::GetTargets() which obtains clipboard targets. We need to call Gtk code for that and spin evetn loop to get the targets.
In this patch we store clipboard tragets internally to speed up nsClipboard::HasDataMatchingFlavors() calls. We also listen at owner-change signal to clear target cache when clipboard content changes.
| Assignee | ||
Comment 16•4 years ago
|
||
| Assignee | ||
Comment 17•4 years ago
|
||
Hm, the try doesn't look good but I don't see any connections to the clipboard code there.
| Assignee | ||
Comment 18•4 years ago
|
||
Looks like missing cache clear in ~nsRetrievalContext().
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=83983ac0fedc7ab7df339ad69eab5ec1c6d40051
| Assignee | ||
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
| bugherder | ||
Description
•