gecko-dev/ipc
Anny Gakhokidze 535e3c83a1 Bug 1470540 - Improve performance of DataTransfer::CacheExternalClipboardFormats, r=baku,mccr8
Currently, in order to retrieve supported clipboard formats
DataTransfer::CacheExternalClipboardFormats repeatedly makes the same calls to
clipboard->HasDataMatchingFlavors.

In the case when aPlainTextOnly == true only 1 call is made -
clipboard->HasDataMatchingFlavors(kUnicodeMime, ...), and when
aPlainTextOnly == false we have 1 call made for every member of the list
{ kCustomTypesMime, kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime,
kUnicodeMime, kPNGImageMime } - a total of 8 calls.

We can see that in nsClipboardProxy::HasDataMatchingFlavors, there is a call to
ContentChild::GetSingleton()->SendClipboardHasType.
So when aPlainTextOnly == true, we will have 1 sync message, and when
aPlainTextOnly == false, we will have 8 sync messages.

With the proposed solution, in DataTransfer::CacheExternalClipboardFormats
we will only have 1 sync message regardless of the case because
GetExternalClipboardFormats() will retrieve all supported clipboard
formats at once.

MozReview-Commit-ID: CAmBfqB459v

--HG--
extra : rebase_source : 27f1b420f2613e6a747ed63762f1583ab71ba3e0
2018-06-22 14:28:27 -04:00
..
app Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout 2018-02-07 15:02:58 +02:00
chromium Bug 1461459: Add nightly-only MOZ_CRASH statements in base::LaunchApp on macOS to investigate failures to asynchronously launch content processes. r=jld 2018-06-15 10:46:33 -07:00
contentproc Bug 1330529 - Part 3: Protect DLL loads in wmain instead of waiting until PluginProcessChild::Init. r=jimm 2018-02-02 22:53:34 -08:00
glue Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
ipdl Bug 1470540 - Improve performance of DataTransfer::CacheExternalClipboardFormats, r=baku,mccr8 2018-06-22 14:28:27 -04:00
mscom Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika 2018-04-29 18:21:20 -07:00
testshell Bug 1466501 part 1 - Refactor ZoneSpecifier and add a sameCompartmentAs option to newGlobal in the shell. r=luke 2018-06-07 10:02:10 +02:00
moz.build Bug 1412258 - Get rid of ipc/dbus, r=smaug 2017-10-27 18:41:40 +02:00
pull-chromium.py