Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 1169576 - [Messages][NG] Implement Conversation service: method for streaming joined threads and drafts list. r=julien #31051

Merged
merged 1 commit into from
Aug 27, 2015
Merged

Conversation

azasypkin
Copy link
Contributor

No description provided.

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

@@ -79,9 +79,9 @@
<script defer src="views/shared/js/inter_instance_event_dispatcher.js"></script>
<script defer src="views/shared/js/time_headers.js"></script>
<script defer src="views/shared/js/contacts.js"></script>
<script defer src="views/shared/js/utils.js"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utils is required by Drafts, and import-scripts trick will try to call ``importScripts` for the Utils since it's not loaded yet - and it will fail in window context :)

@mozilla-autolander-deprecated
Copy link
Contributor

'Conversation with id %s is retrieved from stream', thread.id
);

onConversationRetrieved(new Thread(thread));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since client is hosted altogether with the view, it's responsible for returning complete model, not just raw data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should even cache /store the thread here, but we can do it later since we might also need to rewrite Threads in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my concern here is that we're calling onConversationRetrieved synchronously; might be one of the reasons of the slowness ? Wondering if we should leverage the Utils.async tool we have and use promises instead ? Or maybe promises are too "microtask" and that wouldn't change anything, and we'd need (eg) a requestAnimationFrame (maybe inside the callback instead of here though).

Quite thinking out loud here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my concern here is that we're calling onConversationRetrieved synchronously; might be one of the reasons of the slowness ?

Hmm, I'll check, but I was thinking that this should not affect performance overall. I mean that this doesn't stop cursor from iterating, once thread is retrieved, it's passed further via asynchronous postMessage from iframe to ShW (via BroadcastChannel) and then again asynchronously through MessageChannel to Window. I was assuming we render thread faster then next thread goes through this chain.... But as always need to measure first :)

@azasypkin
Copy link
Contributor Author

Some "funny" numbers for you guys @steveck-chung @julienw. Here is raptor result (20 RUNS, reference-workload-light, for the extracted (views/inbox/index.html in manifest entry point) Inbox view):

  • Current master (no bridge involved into conversation retrieval):
Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 493.150 493.000 413.000 562.000 29.723 546.500
coldlaunch.willRenderThreads 548.700 549.000 467.000 621.000 31.471 600.500
coldlaunch.navigationInteractive 558.000 561.000 480.000 632.000 32.019 611.000
coldlaunch.1thread-retrieved 884.750 882.500 740.000 1091.000 74.782 1031.500
coldlaunch.2thread-retrieved 1000.150 995.500 897.000 1231.000 70.549 1147.500
coldlaunch.3thread-retrieved 1011.350 1008.500 905.000 1246.000 72.244 1159.000
coldlaunch.4thread-retrieved 1022.750 1019.000 915.000 1261.000 71.688 1171.500
coldlaunch.5thread-retrieved 1035.000 1031.000 923.000 1281.000 73.559 1190.500
coldlaunch.6thread-retrieved 1044.050 1039.500 933.000 1298.000 74.986 1203.500
coldlaunch.7thread-retrieved 1053.350 1047.500 941.000 1317.000 76.465 1216.500
coldlaunch.8thread-retrieved 1062.000 1058.000 950.000 1328.000 77.108 1227.000
coldlaunch.9thread-retrieved 1070.100 1066.000 958.000 1337.000 77.142 1235.000
coldlaunch.visuallyLoaded 1092.000 1088.000 978.000 1370.000 79.356 1263.000
coldlaunch.10thread-retrieved 1092.700 1089.000 979.000 1372.000 79.719 1264.500
coldlaunch.contentInteractive 1398.750 1407.000 1214.000 1702.000 96.701 1588.000
coldlaunch.objectsInitEnd 1399.900 1408.000 1215.000 1703.000 96.713 1589.500
coldlaunch.11thread-retrieved 1413.600 1422.500 1224.000 1721.000 97.613 1606.000
coldlaunch.12thread-retrieved 1427.300 1437.500 1239.000 1730.000 96.827 1619.500
coldlaunch.13thread-retrieved 1438.150 1450.000 1246.000 1740.000 98.233 1628.000
coldlaunch.14thread-retrieved 1446.150 1458.000 1253.000 1749.000 98.564 1636.500
coldlaunch.15thread-retrieved 1453.650 1465.500 1261.000 1757.000 98.665 1644.500
coldlaunch.16thread-retrieved 1461.400 1472.500 1272.000 1765.000 98.289 1652.000
coldlaunch.17thread-retrieved 1469.150 1480.000 1281.000 1773.000 98.038 1660.000
coldlaunch.18thread-retrieved 1476.650 1487.000 1288.000 1782.000 98.048 1668.000
coldlaunch.19thread-retrieved 1486.050 1495.500 1296.000 1798.000 99.315 1680.000
coldlaunch.20thread-retrieved 1752.300 1756.000 1614.000 2080.000 91.399 1942.500
coldlaunch.21thread-retrieved 1759.800 1762.500 1620.000 2090.000 92.454 1953.500
coldlaunch.22thread-retrieved 1770.900 1771.500 1630.000 2113.000 94.440 1970.500
coldlaunch.23thread-retrieved 1778.800 1780.000 1639.000 2121.000 94.502 1978.000
coldlaunch.24thread-retrieved 1786.100 1787.000 1647.000 2128.000 94.489 1985.000
coldlaunch.25thread-retrieved 1796.000 1798.500 1657.000 2135.000 93.980 1994.000
coldlaunch.26thread-retrieved 1805.400 1808.000 1666.000 2141.000 93.571 2001.000
coldlaunch.27thread-retrieved 1813.500 1816.500 1674.000 2148.000 93.786 2011.500
coldlaunch.28thread-retrieved 1821.200 1826.000 1683.000 2155.000 93.556 2019.500
coldlaunch.29thread-retrieved 2063.800 2049.500 1918.000 2438.000 109.336 2308.000
coldlaunch.30thread-retrieved 2072.000 2059.500 1925.000 2453.000 110.435 2319.000
coldlaunch.31thread-retrieved 2081.350 2069.500 1934.000 2472.000 111.783 2332.500
coldlaunch.32thread-retrieved 2088.950 2076.500 1940.000 2482.000 111.980 2340.500
coldlaunch.33thread-retrieved 2096.600 2084.000 1949.000 2490.000 111.787 2348.000
coldlaunch.34thread-retrieved 2104.100 2091.500 1957.000 2498.000 111.652 2356.000
coldlaunch.35thread-retrieved 2113.850 2100.000 1965.000 2513.000 112.544 2368.500
coldlaunch.36thread-retrieved 2121.100 2107.000 1973.000 2522.000 112.662 2376.000
coldlaunch.37thread-retrieved 2128.450 2114.000 1980.000 2529.000 112.469 2383.000
coldlaunch.fullyLoaded 2419.450 2407.000 2274.000 2772.000 101.350 2633.500
coldlaunch.uss 16.760 16.300 16.100 18.600 0.739 18.450
coldlaunch.pss 20.800 20.400 20.100 22.600 0.728 22.500
coldlaunch.rss 36.095 35.700 35.400 37.900 0.739 37.800
  • Current PR (with 3 bridge hops: main window -> Shared Worker -> iframe):
Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 545.850 549.000 463.000 638.000 43.243 623.000
coldlaunch.willRenderThreads 606.950 612.500 517.000 689.000 43.253 675.000
coldlaunch.navigationInteractive 616.800 623.500 535.000 698.000 42.438 683.500
coldlaunch.1thread-retrieved 1417.850 1413.500 1380.000 1532.000 33.543 1493.500
coldlaunch.2thread-retrieved 1577.200 1595.000 1473.000 1647.000 51.077 1644.000
coldlaunch.3thread-retrieved 1686.150 1685.500 1567.000 1816.000 48.994 1777.000
coldlaunch.4thread-retrieved 1773.400 1773.000 1688.000 1898.000 42.373 1865.500
coldlaunch.5thread-retrieved 1849.350 1848.000 1768.000 1978.000 43.682 1947.000
coldlaunch.6thread-retrieved 1920.300 1924.500 1800.000 2033.000 51.729 2007.000
coldlaunch.7thread-retrieved 2011.250 2018.000 1876.000 2094.000 46.911 2086.500
coldlaunch.8thread-retrieved 2086.850 2090.000 1950.000 2213.000 50.888 2184.000
coldlaunch.9thread-retrieved 2177.500 2179.500 2062.000 2301.000 46.033 2259.000
coldlaunch.visuallyLoaded 2201.400 2204.500 2089.000 2327.000 45.301 2284.000
coldlaunch.contentInteractive 2339.900 2332.000 2225.000 2451.000 46.125 2430.500
coldlaunch.objectsInitEnd 2341.000 2333.000 2226.000 2452.000 46.030 2431.500
coldlaunch.10thread-retrieved 2344.050 2336.500 2229.000 2455.000 46.130 2435.000
coldlaunch.11thread-retrieved 2408.450 2409.000 2302.000 2538.000 49.966 2527.500
coldlaunch.12thread-retrieved 2479.000 2473.500 2375.000 2624.000 52.863 2608.000
coldlaunch.13thread-retrieved 2554.500 2548.000 2441.000 2691.000 54.757 2676.500
coldlaunch.14thread-retrieved 2622.600 2623.000 2526.000 2752.000 52.320 2741.000
coldlaunch.15thread-retrieved 2689.500 2684.000 2583.000 2831.000 57.379 2816.000
coldlaunch.16thread-retrieved 2751.550 2749.500 2646.000 2890.000 57.320 2874.500
coldlaunch.17thread-retrieved 2816.500 2811.000 2716.000 2947.000 56.090 2936.000
coldlaunch.18thread-retrieved 2875.500 2871.000 2776.000 3010.000 57.958 3004.000
coldlaunch.19thread-retrieved 2938.350 2934.500 2834.000 3064.000 56.908 3060.000
coldlaunch.20thread-retrieved 3016.300 3012.000 2914.000 3144.000 58.560 3140.500
coldlaunch.21thread-retrieved 3082.850 3081.000 2974.000 3214.000 59.065 3211.000
coldlaunch.22thread-retrieved 3146.250 3140.500 3045.000 3270.000 56.047 3269.000
coldlaunch.23thread-retrieved 3216.400 3204.500 3112.000 3344.000 58.026 3342.500
coldlaunch.24thread-retrieved 3320.400 3310.000 3213.000 3454.000 57.741 3453.500
coldlaunch.25thread-retrieved 3392.650 3387.500 3274.000 3535.000 59.803 3530.500
coldlaunch.26thread-retrieved 3469.300 3460.000 3363.000 3610.000 58.867 3601.500
coldlaunch.27thread-retrieved 3541.050 3543.000 3428.000 3672.000 58.168 3670.500
coldlaunch.28thread-retrieved 3600.750 3600.000 3497.000 3723.000 51.365 3720.500
coldlaunch.29thread-retrieved 3669.850 3668.500 3562.000 3786.000 49.641 3784.000
coldlaunch.30thread-retrieved 3735.450 3730.000 3643.000 3861.000 52.046 3854.500
coldlaunch.31thread-retrieved 3800.250 3794.000 3699.000 3915.000 51.194 3912.500
coldlaunch.32thread-retrieved 3859.800 3851.500 3767.000 3981.000 51.748 3977.000
coldlaunch.33thread-retrieved 3920.200 3913.500 3827.000 4040.000 50.793 4034.000
coldlaunch.34thread-retrieved 3985.200 3979.500 3895.000 4110.000 52.666 4108.500
coldlaunch.35thread-retrieved 4054.400 4049.000 3968.000 4181.000 52.540 4173.500
coldlaunch.36thread-retrieved 4114.600 4110.500 4025.000 4242.000 54.814 4241.000
coldlaunch.37thread-retrieved 4173.550 4171.000 4084.000 4297.000 54.266 4294.000
coldlaunch.fullyLoaded 4242.100 4239.500 4157.000 4369.000 56.975 4368.000
coldlaunch.uss 18.040 17.900 17.100 18.900 0.362 18.700
coldlaunch.rss 37.420 37.300 36.600 38.400 0.370 38.100
coldlaunch.pss 22.110 22.000 21.200 23.000 0.369 22.750

So going to experiment and try batching...

@julienw
Copy link
Contributor

julienw commented Jul 28, 2015

90ms for each thread instead of 15ms. Ouch.

* Type description for the ConversationSummary object that is return from the
* Conversation service.
* @typedef {Object} ConversationSummary
* @property {number} id Unique identifier of the the conversation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be a string (for drafts, draftId is actually a string -- in my mind back then, I had id that started with draft- for drafts and thread- for threads -- could be conversation now btw)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, currently it should be number for both thread [1] and draft [2]. Am I missing something?

[1] http://mxr.mozilla.org/mozilla-central/source/dom/mobilemessage/interfaces/nsIDOMMozMobileMessageThread.idl#12
[2]

throw new Error('Draft id must be a number');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm ok, I likely thought of the DOM id and what I would like to see for draft/conversation ids in my mind ;)

I'm mainly afraid of collisions if we don't have a 100%-safe way to generate different ids for drafts and conversations. Maybe when we'll have a gaia-based DB we can ensure this with numbers but nowadays I don't see how this is reliably possible. We're just lucky for now ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe when we'll have a gaia-based DB we can ensure this with numbers but nowadays I don't see how this is reliably possible. We're just lucky for now ;)

Yep, exactly! I'll keep number since now it reflects the current state of things and we can migrate to strings later on.

@mozilla-autolander-deprecated
Copy link
Contributor

getAllConversationsStream.listen((thread) => {
debug('Conversation with id %s is retrieved from stream', thread.id);

onConversationRetrieved(new Thread(thread));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'll check, but I was thinking that this should not affect performance overall. I mean that this doesn't stop cursor from iterating, once thread is retrieved, it's passed further via asynchronous postMessage from iframe to ShW (via BroadcastChannel) and then again asynchronously through MessageChannel to Window. I was assuming we render thread faster then next thread goes through this chain.... But as always need to measure first :)

Be careful with DOM Events, they're actually rarely asynchronous. (cross-frames postMessage actually is, but not sure for BroadcastChannels)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, but not sure for BroadcastChannels

I believe they're async as well. Just tried the following test case:

var sender = new BroadcastChannel('channel');

var receiver = new BroadcastChannel('channel');
receiver.onmessage = () => { 
    console.log('Time when on message handler invoked %s', new Date());
    var payload = Array.from({length: 9999999});
    payload.forEach(() => {});
    payload.forEach(() => {});
    console.log('Time when on message handler completed %s', new Date());
}

console.log('Time before message is posted %s', new Date());
sender.postMessage('a');
console.log('Time after message is posted %s', new Date());

Output is:

Time before message is posted Fri Jul 31 2015 19:53:52 GMT+0200 (CEST)
Time after message is posted Fri Jul 31 2015 19:53:52 GMT+0200 (CEST)
Time when on message handler invoked Fri Jul 31 2015 19:53:53 GMT+0200 (CEST)
Time when on message handler completed Fri Jul 31 2015 19:54:04 GMT+0200 (CEST)

But @bakulf should know for sure.

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

'use strict';

var shimHostIframe = document.querySelector('.shim-host');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: How about we move ConversationClient.init(App.instanceId) to here as well? Maybe it's better to aggregate the client init/service bootstrap in same place and startup doesn't need to reference App or shim related client. (I was thinking that this part could be in Startup.init but I'm fine if you want to sync with shim bootstrap)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that this part could be in Startup.init but I'm fine if you want to sync with shim bootstrap)

Yeah, maybe it will be better to keep this in startup - will move it there.

@azasypkin azasypkin closed this Aug 19, 2015
@azasypkin azasypkin reopened this Aug 19, 2015
@mozilla-autolander-deprecated
Copy link
Contributor

@azasypkin
Copy link
Contributor Author

I'll put here performance numbers I've got so far, one github comment per approach I've investigated:

1st approach: master (light workload):

Don't have much to say here, "performance spikes" are likely related to maxReadAheadEntries setting, when Gecko reads new page.

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1178.650 1185.000 1037.000 1261.000 58.539 1256.000
coldlaunch.willRenderThreads 1215.850 1221.000 1075.000 1298.000 57.861 1293.000
coldlaunch.[MessageManager] start retrieving conversations 1217.400 1223.000 1076.000 1300.000 57.978 1294.500
coldlaunch.navigationInteractive 1218.900 1224.500 1077.000 1301.000 57.933 1296.000
coldlaunch.[MessageManager] 1 conversation retrieved 1398.300 1398.500 1265.000 1472.000 52.043 1469.500
coldlaunch.[MessageManager] 2 conversation retrieved 1564.950 1566.500 1421.000 1645.000 55.253 1645.000
coldlaunch.[MessageManager] 3 conversation retrieved 1576.800 1575.500 1437.000 1656.000 54.204 1655.000
coldlaunch.[MessageManager] 4 conversation retrieved 1587.300 1587.500 1444.000 1673.000 55.492 1667.500
coldlaunch.[MessageManager] 5 conversation retrieved 1596.200 1599.500 1452.000 1683.000 55.512 1676.500
coldlaunch.[MessageManager] 6 conversation retrieved 1603.550 1606.500 1459.000 1692.000 55.837 1684.500
coldlaunch.[MessageManager] 7 conversation retrieved 1611.800 1615.500 1467.000 1701.000 55.977 1693.000
coldlaunch.[MessageManager] 8 conversation retrieved 1619.600 1623.000 1474.000 1710.000 56.779 1702.500
coldlaunch.[MessageManager] 9 conversation retrieved 1628.250 1631.500 1481.000 1721.000 57.693 1712.500
coldlaunch.visuallyLoaded 1637.200 1640.500 1488.000 1729.000 58.251 1721.500
coldlaunch.[MessageManager] 10 conversation retrieved 1704.700 1706.500 1547.000 1814.000 60.701 1798.000
coldlaunch.contentInteractive 2211.500 2211.500 2046.000 2326.000 63.568 2302.500
coldlaunch.objectsInitEnd 2245.550 2244.500 2078.000 2358.000 64.325 2337.500
coldlaunch.[MessageManager] 11 conversation retrieved 2249.100 2248.000 2083.000 2362.000 64.126 2341.000
coldlaunch.[MessageManager] 12 conversation retrieved 2266.200 2264.000 2100.000 2379.000 64.015 2357.500
coldlaunch.[MessageManager] 13 conversation retrieved 2273.750 2271.500 2107.000 2386.000 64.474 2367.000
coldlaunch.[MessageManager] 14 conversation retrieved 2280.750 2279.000 2113.000 2393.000 64.727 2374.500
coldlaunch.[MessageManager] 15 conversation retrieved 2287.750 2285.500 2119.000 2401.000 65.150 2382.500
coldlaunch.[MessageManager] 16 conversation retrieved 2294.750 2293.000 2126.000 2408.000 65.253 2390.000
coldlaunch.[MessageManager] 17 conversation retrieved 2301.750 2300.000 2132.000 2415.000 65.467 2397.000
coldlaunch.[MessageManager] 18 conversation retrieved 2309.300 2307.000 2138.000 2422.000 65.618 2404.500
coldlaunch.[MessageManager] 19 conversation retrieved 2316.350 2314.000 2145.000 2430.000 65.809 2412.000
coldlaunch.[MessageManager] 20 conversation retrieved 2582.750 2577.000 2468.000 2691.000 61.342 2677.500
coldlaunch.[MessageManager] 21 conversation retrieved 2588.700 2582.500 2474.000 2697.000 61.519 2684.000
coldlaunch.[MessageManager] 22 conversation retrieved 2596.900 2591.000 2481.000 2706.000 61.885 2692.500
coldlaunch.[MessageManager] 23 conversation retrieved 2604.200 2599.500 2489.000 2714.000 61.918 2700.000
coldlaunch.[MessageManager] 24 conversation retrieved 2611.250 2606.500 2500.000 2721.000 61.846 2708.000
coldlaunch.[MessageManager] 25 conversation retrieved 2623.650 2616.000 2519.000 2734.000 61.590 2722.000
coldlaunch.[MessageManager] 26 conversation retrieved 2631.850 2625.000 2526.000 2741.000 61.624 2729.500
coldlaunch.[MessageManager] 27 conversation retrieved 2638.700 2631.500 2532.000 2748.000 61.535 2736.500
coldlaunch.[MessageManager] 28 conversation retrieved 2645.750 2639.500 2539.000 2755.000 61.399 2743.500
coldlaunch.[MessageManager] 29 conversation retrieved 2910.200 2909.000 2791.000 3094.000 72.846 3045.500
coldlaunch.[MessageManager] 30 conversation retrieved 2917.350 2915.500 2797.000 3103.000 72.798 3053.500
coldlaunch.[MessageManager] 31 conversation retrieved 2925.150 2922.000 2804.000 3112.000 73.132 3061.000
coldlaunch.[MessageManager] 32 conversation retrieved 2932.300 2928.500 2811.000 3119.000 72.913 3068.500
coldlaunch.[MessageManager] 33 conversation retrieved 2938.650 2935.000 2818.000 3126.000 72.886 3075.000
coldlaunch.[MessageManager] 34 conversation retrieved 2945.350 2942.000 2825.000 3132.000 72.695 3081.500
coldlaunch.[MessageManager] 35 conversation retrieved 2966.900 2954.500 2833.000 3216.000 92.341 3178.000
coldlaunch.[MessageManager] 36 conversation retrieved 2973.450 2960.500 2839.000 3223.000 92.405 3184.500
coldlaunch.[MessageManager] 37 conversation retrieved 2981.050 2967.500 2845.000 3238.000 93.896 3197.000
coldlaunch.[MessageManager] 38 conversation retrieved 3393.900 3399.500 3296.000 3481.000 53.802 3478.000
coldlaunch.fullyLoaded 3404.850 3411.500 3313.000 3491.000 53.649 3487.500
coldlaunch.uss 19.310 19.200 19.100 19.700 0.219 19.700
coldlaunch.rss 39.610 39.500 39.400 40.000 0.223 40.000
coldlaunch.pss 23.830 23.700 23.500 24.300 0.241 24.250

@azasypkin
Copy link
Contributor Author

2nd approach: master (light workload) + small change that makes master behaves a bit more like ConversationService - wait for the Drafts.request before rendering threads.

It's just for more fair comparison with ConversationService :)

First we start threads cursor, then call Drafts.request, but don't return any thread to Inbox view until Draft.request is resolved. So it noticeably slows down visuallyLoaded

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1182.300 1181.500 1043.000 1398.000 78.146 1333.000
coldlaunch.willRenderThreads 1220.000 1217.500 1083.000 1435.000 77.614 1372.000
coldlaunch.[MessageManager] start retrieving conversations 1220.350 1218.000 1083.000 1435.000 77.540 1372.000
coldlaunch.navigationInteractive 1223.550 1220.000 1088.000 1438.000 77.026 1374.500
coldlaunch.[MessageManager] 1 conversation retrieved 1406.900 1390.000 1284.000 1608.000 69.877 1548.500
coldlaunch.[MessageManager] 2 conversation retrieved 1463.950 1449.500 1339.000 1663.000 70.392 1600.000
coldlaunch.[MessageManager] 3 conversation retrieved 1464.550 1449.500 1339.000 1664.000 70.655 1601.000
coldlaunch.[MessageManager] 4 conversation retrieved 1465.700 1450.500 1340.000 1665.000 70.615 1603.000
coldlaunch.[MessageManager] 5 conversation retrieved 1466.900 1454.500 1340.000 1666.000 70.725 1603.500
coldlaunch.[MessageManager] 6 conversation retrieved 1467.700 1455.500 1341.000 1667.000 70.846 1605.000
coldlaunch.[MessageManager] 7 conversation retrieved 1468.450 1456.000 1341.000 1667.000 70.927 1606.000
coldlaunch.[MessageManager] 8 conversation retrieved 1469.700 1457.000 1341.000 1668.000 70.590 1607.000
coldlaunch.[MessageManager] 9 conversation retrieved 1470.900 1458.500 1344.000 1668.000 70.026 1607.500
coldlaunch.[MessageManager] 10 conversation retrieved 1472.100 1459.500 1350.000 1669.000 69.516 1608.500
coldlaunch.visuallyLoaded 1756.550 1703.000 1567.000 2000.000 139.943 1990.000
coldlaunch.[MessageManager] 11 conversation retrieved 1896.850 2092.500 1382.000 2410.000 394.348 2386.500
coldlaunch.[MessageManager] 12 conversation retrieved 1897.600 2093.500 1382.000 2410.000 394.579 2387.000
coldlaunch.[MessageManager] 13 conversation retrieved 1898.400 2094.000 1383.000 2411.000 394.421 2387.500
coldlaunch.[MessageManager] 14 conversation retrieved 1899.050 2094.500 1383.000 2412.000 394.384 2388.500
coldlaunch.[MessageManager] 15 conversation retrieved 1899.600 2095.000 1384.000 2413.000 394.436 2389.500
coldlaunch.[MessageManager] 16 conversation retrieved 1900.100 2095.000 1384.000 2413.000 394.439 2389.500
coldlaunch.[MessageManager] 17 conversation retrieved 1900.900 2096.000 1385.000 2414.000 394.247 2390.500
coldlaunch.[MessageManager] 18 conversation retrieved 1901.450 2097.000 1385.000 2415.000 394.308 2391.000
coldlaunch.[MessageManager] 19 conversation retrieved 1902.350 2098.000 1386.000 2415.000 394.281 2391.500
coldlaunch.contentInteractive 2450.100 2436.500 2197.000 2708.000 148.670 2678.000
coldlaunch.objectsInitEnd 2487.150 2466.000 2255.000 2744.000 143.455 2713.000
coldlaunch.[MessageManager] 20 conversation retrieved 2567.850 2654.500 1968.000 2918.000 243.721 2879.000
coldlaunch.[MessageManager] 21 conversation retrieved 2568.300 2655.000 1969.000 2918.000 243.591 2879.500
coldlaunch.[MessageManager] 22 conversation retrieved 2605.750 2717.000 1969.000 2919.000 238.648 2880.000
coldlaunch.[MessageManager] 23 conversation retrieved 2623.550 2721.500 1969.000 2920.000 235.113 2880.500
coldlaunch.[MessageManager] 24 conversation retrieved 2693.750 2723.500 1970.000 3207.000 250.499 3097.000
coldlaunch.[MessageManager] 25 conversation retrieved 2694.450 2724.000 1971.000 3208.000 250.361 3097.500
coldlaunch.[MessageManager] 26 conversation retrieved 2730.650 2724.500 2297.000 3209.000 187.809 3098.500
coldlaunch.[MessageManager] 27 conversation retrieved 2756.500 2732.500 2346.000 3209.000 159.545 3098.500
coldlaunch.[MessageManager] 28 conversation retrieved 2757.300 2733.000 2347.000 3210.000 159.640 3099.500
coldlaunch.[MessageManager] 29 conversation retrieved 2949.850 2990.500 2680.000 3228.000 171.646 3219.500
coldlaunch.[MessageManager] 30 conversation retrieved 2950.650 2991.500 2681.000 3228.000 171.813 3220.000
coldlaunch.[MessageManager] 31 conversation retrieved 2980.750 3016.000 2682.000 3229.000 159.569 3221.000
coldlaunch.[MessageManager] 32 conversation retrieved 2994.850 3017.000 2682.000 3230.000 149.711 3222.000
coldlaunch.[MessageManager] 33 conversation retrieved 3043.200 3033.000 2683.000 3559.000 182.025 3420.000
coldlaunch.[MessageManager] 34 conversation retrieved 3044.000 3035.000 2683.000 3559.000 181.953 3420.500
coldlaunch.[MessageManager] 35 conversation retrieved 3067.100 3044.500 2781.000 3559.000 162.864 3421.500
coldlaunch.[MessageManager] 36 conversation retrieved 3083.550 3058.000 2782.000 3560.000 151.665 3424.500
coldlaunch.[MessageManager] 37 conversation retrieved 3084.400 3059.000 2782.000 3560.000 151.664 3425.500
coldlaunch.[MessageManager] 38 conversation retrieved 3445.300 3423.500 3112.000 3819.000 148.996 3740.000
coldlaunch.fullyLoaded 3458.050 3436.500 3123.000 3830.000 149.301 3752.500
coldlaunch.uss 19.515 19.500 19.200 19.700 0.146 19.700
coldlaunch.pss 24.010 24.050 23.600 24.300 0.181 24.250
coldlaunch.rss 39.735 39.750 39.300 40.000 0.185 40.000

@azasypkin
Copy link
Contributor Author

3rd approach: ConversationClient ---SharedWorker(MessageChannel)---> ConversationService ---BC---> MobileMessageShim (iframe)

That's our original idea, where main service in SharedWorker and shim is inside iframe. So here are known problems:

  1. SharedWorker is slow to start (difference between "[ConversationClient] shared worker service created" and "[ConversationService] file loaded"), we have Bug 1191926 - It takes too much time to start Shared Worker in B2G and Bug 1191339 - Launch application with ServiceWorker registered takes much longer to fix this.
  2. It's a bit slow to import all dependencies (difference between "[ConversationService] file loaded" and "ConversationService] dependencies imported"). Likely Bug 1164389 - Bytecode cache should help here as well. In this service we need both client and service parts, so we need entire lib;
  3. There is suspicious delay between the time when client is connected and service method is called (e.g. see difference between "[ConversationService] client connected" and "[ConversationService] start retrieving conversations"). Sometimes it even worse, also I see it only when MessageChannel is used, will talk to Wilson today to figure out what's really happening there;
  4. Also it seems that we don't allow retrieved thread to reach client as soon as we get it (see table below for the entries when "[MozMobileMessageShim]" retrieved particular thread and when "[ConversationService]" and "[ConversationClient]" get it) - looks like shim is busy retrieving conversation and conversation is not passed through all the channels if thread is busy - not really sure what is going on here. Do you have an idea?
Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1349.300 1341.500 1219.000 1490.000 58.067 1471.500
coldlaunch.[ConversationClient] initialize shared worker service 1349.750 1342.500 1219.000 1490.000 58.079 1472.000
coldlaunch.[ConversationClient] shared worker service created 1359.150 1351.500 1228.000 1499.000 58.147 1480.500
coldlaunch.willRenderThreads 1398.600 1392.000 1263.000 1539.000 59.325 1520.000
coldlaunch.[ConversationClient] start retrieving conversations 1399.100 1392.500 1263.000 1539.000 59.447 1520.500
coldlaunch.navigationInteractive 1401.700 1395.000 1266.000 1541.000 59.347 1522.500
coldlaunch.[ConversationService] file loaded 1942.300 1976.500 1772.000 2102.000 107.879 2097.500
coldlaunch.[ConversationService] dependencies imported 2125.150 2138.000 1988.000 2234.000 76.239 2233.500
coldlaunch.[ConversationService] client connected 2145.950 2159.000 2013.000 2274.000 80.227 2269.000
coldlaunch.[ConversationService] start retrieving conversations 2164.400 2178.000 2025.000 2286.000 80.279 2282.000
coldlaunch.[ConversationService] drafts index loaded 2210.400 2219.500 2062.000 2326.000 81.589 2320.500
coldlaunch.[MozMobileMessageShim] client connected 2203.650 2220.000 2067.000 2327.000 79.460 2315.000
coldlaunch.[MozMobileMessageShim] start retrieving conversations 2227.100 2242.500 2088.000 2352.000 80.714 2342.000
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 2246.050 2270.500 2105.000 2368.000 80.232 2356.500
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 2266.050 2291.500 2115.000 2382.000 84.592 2381.000
coldlaunch.[ConversationService] 1, conversation retrieved 2256.200 2280.000 2113.000 2376.000 80.256 2364.500
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 2291.850 2298.000 2125.000 2495.000 98.147 2463.500
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 2337.700 2313.000 2128.000 2684.000 132.598 2591.000
coldlaunch.[ConversationService] 2, conversation retrieved 2288.500 2309.000 2135.000 2481.000 94.697 2439.000
coldlaunch.[ConversationService] 3, conversation retrieved 2330.900 2337.500 2144.000 2528.000 111.914 2524.000
coldlaunch.[ConversationClient] 1, conversation retrieved 2281.600 2305.500 2142.000 2406.000 79.476 2387.500
coldlaunch.[ConversationService] 4, conversation retrieved 2405.550 2423.000 2163.000 2691.000 144.577 2639.500
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 2367.900 2321.000 2208.000 2686.000 114.201 2597.000
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 2393.800 2376.000 2240.000 2757.000 121.917 2637.500
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 2415.550 2424.500 2254.000 2761.000 120.715 2659.500
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 2434.350 2426.500 2256.000 2857.000 132.336 2715.000
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 2443.050 2434.000 2260.000 2860.000 133.895 2718.500
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 2452.050 2437.000 2262.000 2865.000 132.335 2722.500
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 2488.550 2455.000 2306.000 2869.000 124.919 2741.000
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 2512.250 2507.500 2313.000 2874.000 119.850 2749.500
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 2514.700 2510.000 2315.000 2876.000 120.196 2753.000
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 2517.050 2512.500 2321.000 2878.000 119.982 2755.500
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 2519.300 2515.000 2322.000 2881.000 120.201 2758.500
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 2530.400 2531.500 2323.000 2884.000 126.121 2790.000
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 2547.100 2533.500 2326.000 2984.000 138.917 2842.000
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 2554.050 2535.500 2328.000 2987.000 141.418 2846.000
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 2568.700 2537.500 2330.000 2990.000 141.924 2851.000
coldlaunch.[ConversationClient] 2, conversation retrieved 2472.700 2504.000 2340.000 2613.000 84.495 2602.000
coldlaunch.[ConversationService] 5, conversation retrieved 2447.450 2449.500 2248.000 2695.000 114.308 2644.500
coldlaunch.[ConversationService] 6, conversation retrieved 2486.450 2499.000 2304.000 2859.000 127.155 2737.000
coldlaunch.[ConversationService] 7, conversation retrieved 2522.750 2521.000 2346.000 2866.000 129.204 2800.000
coldlaunch.[ConversationService] 8, conversation retrieved 2553.550 2537.000 2360.000 2981.000 140.977 2862.000
coldlaunch.[ConversationService] 9, conversation retrieved 2568.350 2547.500 2368.000 2992.000 143.891 2877.000
coldlaunch.[ConversationService] 10, conversation retrieved 2591.500 2561.000 2389.000 3007.000 141.851 2890.500
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2618.400 2583.000 2426.000 2997.000 136.002 2892.000
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2638.350 2631.000 2427.000 2999.000 129.854 2894.500
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2642.800 2637.000 2430.000 3001.000 130.153 2900.000
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 2645.650 2640.500 2431.000 3002.000 130.339 2902.000
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 2648.350 2644.000 2433.000 3004.000 130.213 2904.500
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 2668.400 2677.000 2434.000 3008.000 145.719 2980.500
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 2688.450 2679.500 2460.000 3086.000 146.427 3021.000
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 2694.600 2685.500 2462.000 3097.000 147.951 3027.500
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 2704.650 2689.000 2463.000 3100.000 144.706 3030.000
coldlaunch.[ConversationService] 11, conversation retrieved 2638.450 2588.500 2445.000 3021.000 137.160 2907.000
coldlaunch.[ConversationService] 12, conversation retrieved 2663.650 2643.000 2456.000 3039.000 132.399 2925.000
coldlaunch.[ConversationService] 13, conversation retrieved 2669.350 2646.500 2459.000 3042.000 132.532 2930.000
coldlaunch.[ConversationService] 14, conversation retrieved 2674.050 2651.000 2463.000 3045.000 132.860 2935.500
coldlaunch.[ConversationClient] 3, conversation retrieved 2615.700 2643.500 2482.000 2738.000 88.937 2731.000
coldlaunch.[ConversationService] 15, conversation retrieved 2680.100 2654.000 2467.000 3049.000 133.350 2941.500
coldlaunch.[ConversationService] 16, conversation retrieved 2689.550 2698.500 2470.000 3052.000 133.710 2952.500
coldlaunch.[ConversationService] 17, conversation retrieved 2704.400 2703.000 2501.000 3086.000 129.989 2973.500
coldlaunch.[ConversationService] 18, conversation retrieved 2709.600 2707.000 2507.000 3098.000 130.265 2980.500
coldlaunch.[ConversationService] 19, conversation retrieved 2720.850 2712.000 2512.000 3105.000 129.655 2986.500
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 2730.400 2691.500 2521.000 3102.000 140.395 3031.500
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 2744.800 2739.500 2523.000 3103.000 136.994 3033.000
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 2747.700 2742.500 2525.000 3105.000 137.089 3034.500
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 2750.300 2746.000 2527.000 3107.000 136.953 3036.000
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 2752.900 2749.000 2528.000 3109.000 136.962 3038.000
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 2759.500 2753.000 2530.000 3112.000 140.273 3059.000
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 2773.250 2755.000 2531.000 3149.000 143.941 3078.500
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 2779.700 2777.000 2534.000 3151.000 144.645 3080.000
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 2789.250 2778.500 2536.000 3153.000 143.430 3082.000
coldlaunch.[ConversationService] 20, conversation retrieved 2737.700 2717.500 2543.000 3110.000 130.351 2997.000
coldlaunch.[ConversationClient] 4, conversation retrieved 2718.900 2753.000 2540.000 2851.000 91.133 2844.500
coldlaunch.[ConversationService] 21, conversation retrieved 2751.900 2748.500 2546.000 3114.000 128.953 3002.500
coldlaunch.[ConversationService] 22, conversation retrieved 2759.300 2752.500 2551.000 3121.000 129.847 3010.000
coldlaunch.[ConversationService] 23, conversation retrieved 2764.350 2755.500 2559.000 3124.000 129.037 3015.000
coldlaunch.[ConversationService] 24, conversation retrieved 2769.750 2760.500 2562.000 3128.000 129.328 3022.500
coldlaunch.[ConversationService] 25, conversation retrieved 2781.600 2779.000 2567.000 3132.000 136.600 3075.000
coldlaunch.[ConversationService] 26, conversation retrieved 2792.050 2784.500 2571.000 3150.000 138.990 3085.000
coldlaunch.[ConversationService] 27, conversation retrieved 2799.550 2798.500 2574.000 3159.000 139.674 3090.500
coldlaunch.[ConversationService] 28, conversation retrieved 2809.300 2801.500 2577.000 3168.000 138.714 3096.500
coldlaunch.[ConversationService] 29, conversation retrieved 2827.600 2805.500 2621.000 3170.000 131.962 3098.500
coldlaunch.[MozMobileMessageShim] all conversations retrieved 2882.450 2876.500 2624.000 3227.000 158.129 3209.000
coldlaunch.[ConversationService] 30, conversation retrieved 2836.200 2837.000 2628.000 3175.000 130.911 3103.500
coldlaunch.[ConversationService] 31, conversation retrieved 2841.250 2840.500 2631.000 3179.000 130.126 3106.500
coldlaunch.[ConversationService] 32, conversation retrieved 2845.900 2847.000 2634.000 3184.000 130.798 3110.500
coldlaunch.[ConversationClient] 5, conversation retrieved 2807.100 2839.000 2638.000 2941.000 87.859 2933.500
coldlaunch.[ConversationService] 33, conversation retrieved 2850.000 2851.000 2639.000 3189.000 131.100 3117.500
coldlaunch.[ConversationService] 34, conversation retrieved 2860.050 2870.000 2642.000 3192.000 137.654 3160.500
coldlaunch.[ConversationService] 35, conversation retrieved 2873.400 2874.500 2657.000 3226.000 135.462 3179.500
coldlaunch.[ConversationClient] 6, conversation retrieved 2882.250 2919.500 2659.000 3016.000 104.056 3008.000
coldlaunch.[ConversationService] 36, conversation retrieved 2877.150 2882.000 2662.000 3230.000 135.647 3184.000
coldlaunch.[ConversationService] 37, conversation retrieved 2886.700 2886.500 2665.000 3235.000 134.540 3188.000
coldlaunch.[ConversationService] All conversations retrieved 2970.350 2959.500 2669.000 3561.000 208.511 3477.000
coldlaunch.[ConversationClient] 7, conversation retrieved 2962.850 2985.000 2764.000 3129.000 96.707 3100.500
coldlaunch.[ConversationClient] 8, conversation retrieved 3043.400 3056.500 2852.000 3203.000 95.395 3179.000
coldlaunch.[ConversationClient] 9, conversation retrieved 3125.300 3145.000 2936.000 3296.000 93.664 3267.000
coldlaunch.visuallyLoaded 3137.150 3155.500 2947.000 3307.000 94.258 3278.000
coldlaunch.contentInteractive 3473.600 3486.000 3289.000 3651.000 88.776 3625.000
coldlaunch.objectsInitEnd 3506.550 3520.000 3319.000 3686.000 89.267 3659.000
coldlaunch.[ConversationClient] 10, conversation retrieved 3510.400 3524.500 3323.000 3690.000 89.243 3663.000
coldlaunch.[ConversationClient] 11, conversation retrieved 3617.500 3641.500 3430.000 3809.000 90.191 3774.500
coldlaunch.[ConversationClient] 12, conversation retrieved 3706.700 3722.500 3510.000 3887.000 90.628 3854.500
coldlaunch.[ConversationClient] 13, conversation retrieved 3852.200 3860.000 3650.000 4030.000 90.981 4005.500
coldlaunch.[ConversationClient] 14, conversation retrieved 3922.050 3927.500 3719.000 4105.000 91.158 4077.500
coldlaunch.[ConversationClient] 15, conversation retrieved 3988.750 3994.000 3775.000 4205.000 96.599 4162.500
coldlaunch.[ConversationClient] 16, conversation retrieved 4059.850 4064.000 3856.000 4284.000 96.723 4235.000
coldlaunch.[ConversationClient] 17, conversation retrieved 4127.450 4132.500 3918.000 4355.000 95.956 4300.500
coldlaunch.[ConversationClient] 18, conversation retrieved 4195.300 4204.500 3983.000 4418.000 93.809 4362.500
coldlaunch.[ConversationClient] 19, conversation retrieved 4265.050 4275.000 4050.000 4490.000 94.860 4436.000
coldlaunch.[ConversationClient] 20, conversation retrieved 4347.450 4355.000 4139.000 4584.000 96.755 4529.000
coldlaunch.[ConversationClient] 21, conversation retrieved 4416.200 4420.500 4203.000 4648.000 94.918 4593.000
coldlaunch.[ConversationClient] 22, conversation retrieved 4487.400 4499.500 4277.000 4708.000 93.710 4659.000
coldlaunch.[ConversationClient] 23, conversation retrieved 4564.400 4578.500 4351.000 4786.000 95.660 4737.000
coldlaunch.[ConversationClient] 24, conversation retrieved 4627.000 4641.500 4410.000 4853.000 96.064 4797.500
coldlaunch.[ConversationClient] 25, conversation retrieved 4691.050 4709.000 4472.000 4912.000 94.779 4858.500
coldlaunch.[ConversationClient] 26, conversation retrieved 4762.950 4771.000 4548.000 4985.000 96.882 4938.000
coldlaunch.[ConversationClient] 27, conversation retrieved 4826.550 4833.500 4606.000 5055.000 99.556 5001.500
coldlaunch.[ConversationClient] 28, conversation retrieved 4891.450 4900.500 4669.000 5135.000 100.765 5071.500
coldlaunch.[ConversationClient] 29, conversation retrieved 4962.450 4967.000 4734.000 5225.000 105.293 5156.500
coldlaunch.[ConversationClient] 30, conversation retrieved 5031.450 5041.000 4799.000 5296.000 107.098 5231.000
coldlaunch.[ConversationClient] 31, conversation retrieved 5118.200 5137.000 4874.000 5389.000 109.504 5307.500
coldlaunch.[ConversationClient] 32, conversation retrieved 5189.100 5201.000 4937.000 5455.000 111.179 5380.500
coldlaunch.[ConversationClient] 33, conversation retrieved 5254.750 5269.500 4996.000 5526.000 112.150 5451.000
coldlaunch.[ConversationClient] 34, conversation retrieved 5328.200 5343.000 5085.000 5592.000 107.318 5522.500
coldlaunch.[ConversationClient] 35, conversation retrieved 5397.450 5410.500 5149.000 5655.000 109.318 5586.500
coldlaunch.[ConversationClient] 36, conversation retrieved 5464.450 5478.000 5212.000 5731.000 111.209 5661.000
coldlaunch.[ConversationClient] 37, conversation retrieved 5531.750 5540.000 5275.000 5809.000 112.755 5741.500
coldlaunch.[ConversationClient] all conversations retrieved 5596.950 5602.500 5332.000 5880.000 116.448 5812.500
coldlaunch.fullyLoaded 5610.800 5618.000 5346.000 5891.000 116.023 5823.000
coldlaunch.uss 21.335 21.300 21.200 21.500 0.096 21.500
coldlaunch.pss 25.900 25.900 25.600 26.100 0.126 26.100
coldlaunch.rss 41.920 41.900 41.700 42.100 0.103 42.100

@azasypkin
Copy link
Contributor Author

4th approach: ConversationClient ---window(MessageChannel)---> ConversationService (window) ---BC---> MobileMessageShim (iframe)

Here I've moved ConversationService to the main window to avoid SharedWorker startup performance problems. Bridge still uses MessageChannel for same window communication.

It's funny, but I don't see any improvement at all. There is a huge delay between the moment when ConversationClient is connected to ConversationService and when first method call reaches ConversationService. In between we see that iframe is loaded and started to bootstrap + one guess is that time spent on MessageChannel initialization, but I don't see such delay in SharedWorker case.... Going to measure how long does it take to establish message channel.

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1315.150 1305.000 1097.000 1445.000 74.578 1431.500
coldlaunch.willRenderThreads 1359.450 1350.000 1138.000 1494.000 75.519 1478.500
coldlaunch.[ConversationClient] start retrieving conversations 1359.900 1350.500 1138.000 1494.000 75.601 1479.000
coldlaunch.navigationInteractive 1362.450 1353.000 1141.000 1497.000 75.653 1481.500
coldlaunch.[ConversationService] client connected 1549.850 1554.000 1375.000 1701.000 67.481 1673.000
coldlaunch.iframe is ready too bootstrap 1665.100 1666.500 1480.000 1830.000 67.848 1795.500
coldlaunch.[ConversationService] start retrieving conversations 1814.700 1809.000 1537.000 2028.000 120.830 1992.500
coldlaunch.[MozMobileMessageShim] client connected 2008.650 1997.000 1836.000 2139.000 70.615 2139.000
coldlaunch.[ConversationService] drafts index loaded 2029.650 2009.500 1872.000 2226.000 69.713 2183.000
coldlaunch.[MozMobileMessageShim] start retrieving conversations 2046.950 2025.500 1892.000 2181.000 65.859 2176.000
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 2077.050 2059.000 1911.000 2246.000 67.121 2216.500
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 2104.000 2089.500 1931.000 2282.000 68.454 2244.000
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 2105.850 2091.500 1932.000 2285.000 68.623 2246.500
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 2114.300 2101.000 1935.000 2289.000 69.411 2260.000
coldlaunch.[ConversationService] 1, conversation retrieved 2129.150 2119.500 1966.000 2313.000 69.384 2271.000
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 2120.700 2104.000 1970.000 2293.000 66.177 2263.500
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 2126.850 2106.000 1973.000 2295.000 68.022 2265.500
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 2135.150 2116.500 1979.000 2301.000 66.660 2271.000
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 2139.100 2119.500 1981.000 2304.000 66.007 2274.500
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 2146.250 2131.000 1987.000 2334.000 68.927 2291.500
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 2150.100 2136.000 1989.000 2336.000 68.375 2294.000
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 2206.600 2193.000 1992.000 2381.000 91.379 2360.000
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 2217.300 2200.500 2001.000 2444.000 96.995 2396.500
coldlaunch.[ConversationService] 2, conversation retrieved 2201.500 2181.500 2019.000 2382.000 82.839 2362.500
coldlaunch.[ConversationService] 3, conversation retrieved 2206.100 2186.000 2022.000 2385.000 82.560 2365.500
coldlaunch.[ConversationService] 4, conversation retrieved 2250.450 2217.000 2026.000 2477.000 106.858 2442.500
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 2223.500 2210.000 2045.000 2446.000 92.940 2398.500
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 2234.000 2244.000 2047.000 2450.000 97.893 2408.000
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 2244.850 2262.500 2049.000 2453.000 98.775 2410.500
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 2255.650 2270.000 2051.000 2455.000 97.257 2412.000
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 2266.600 2277.500 2053.000 2457.000 93.347 2414.000
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 2280.450 2289.000 2055.000 2459.000 96.672 2443.500
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 2291.800 2308.500 2057.000 2460.000 92.797 2445.000
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2376.450 2382.500 2059.000 2522.000 92.857 2492.000
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2383.450 2384.000 2061.000 2573.000 100.627 2548.000
coldlaunch.[ConversationClient] 1, conversation retrieved 2226.900 2220.500 2069.000 2453.000 80.387 2394.000
coldlaunch.[ConversationService] 5, conversation retrieved 2275.800 2236.500 2160.000 2481.000 95.069 2446.500
coldlaunch.[ConversationService] 6, conversation retrieved 2299.450 2318.500 2165.000 2492.000 101.332 2460.000
coldlaunch.[ConversationService] 7, conversation retrieved 2324.400 2356.000 2171.000 2497.000 96.245 2464.500
coldlaunch.[ConversationService] 8, conversation retrieved 2339.550 2372.500 2181.000 2502.000 89.621 2469.500
coldlaunch.[ConversationService] 9, conversation retrieved 2371.500 2381.000 2184.000 2616.000 99.606 2561.000
coldlaunch.[ConversationService] 10, conversation retrieved 2380.150 2392.500 2189.000 2620.000 98.320 2565.000
coldlaunch.[ConversationService] 11, conversation retrieved 2462.150 2446.500 2268.000 2624.000 78.217 2605.000
coldlaunch.[ConversationService] 12, conversation retrieved 2476.050 2454.500 2276.000 2684.000 89.230 2660.000
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2406.050 2392.000 2279.000 2576.000 68.909 2551.000
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 2412.800 2403.000 2281.000 2577.000 70.615 2552.500
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 2419.350 2421.500 2282.000 2579.000 69.912 2554.000
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 2426.600 2439.500 2284.000 2580.000 67.437 2555.500
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 2432.700 2441.000 2285.000 2583.000 63.996 2558.000
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 2449.200 2457.000 2286.000 2653.000 78.130 2619.000
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 2455.900 2458.500 2288.000 2655.000 75.219 2621.000
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 2501.200 2478.500 2289.000 2656.000 80.391 2640.000
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 2505.950 2480.000 2290.000 2659.000 85.063 2657.000
coldlaunch.[ConversationClient] 2, conversation retrieved 2468.200 2470.500 2302.000 2678.000 76.106 2623.000
coldlaunch.[ConversationService] 13, conversation retrieved 2481.850 2457.500 2320.000 2687.000 85.353 2663.000
coldlaunch.[ConversationService] 14, conversation retrieved 2492.850 2474.500 2323.000 2691.000 86.928 2667.000
coldlaunch.[ConversationService] 15, conversation retrieved 2502.650 2497.000 2347.000 2694.000 83.795 2669.500
coldlaunch.[ConversationService] 16, conversation retrieved 2512.400 2520.000 2350.000 2697.000 83.428 2682.500
coldlaunch.[ConversationService] 17, conversation retrieved 2521.650 2531.500 2353.000 2702.000 79.945 2686.500
coldlaunch.[ConversationService] 18, conversation retrieved 2528.650 2534.000 2356.000 2704.000 79.802 2699.000
coldlaunch.[ConversationService] 19, conversation retrieved 2540.300 2540.500 2359.000 2707.000 77.647 2702.000
coldlaunch.[ConversationService] 20, conversation retrieved 2581.950 2571.000 2362.000 2710.000 76.414 2705.000
coldlaunch.[ConversationService] 21, conversation retrieved 2587.650 2573.500 2365.000 2751.000 79.734 2727.000
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 2516.450 2493.000 2368.000 2660.000 77.289 2658.500
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 2525.050 2508.500 2370.000 2661.000 81.655 2660.000
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 2532.050 2542.500 2371.000 2662.000 81.829 2661.500
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 2539.850 2559.500 2373.000 2664.000 81.141 2663.000
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 2545.850 2562.000 2374.000 2665.000 77.685 2664.500
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 2558.700 2572.000 2376.000 2756.000 85.513 2713.500
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 2566.100 2580.000 2377.000 2757.000 83.091 2715.000
coldlaunch.[ConversationClient] 3, conversation retrieved 2596.300 2585.500 2459.000 2815.000 76.020 2753.500
coldlaunch.[MozMobileMessageShim] all conversations retrieved 2647.350 2659.000 2513.000 2850.000 80.901 2794.000
coldlaunch.[ConversationService] 22, conversation retrieved 2604.050 2592.500 2517.000 2754.000 63.687 2730.000
coldlaunch.[ConversationService] 23, conversation retrieved 2611.000 2595.500 2519.000 2758.000 65.980 2734.500
coldlaunch.[ConversationService] 24, conversation retrieved 2618.800 2613.000 2522.000 2761.000 65.776 2737.500
coldlaunch.[ConversationService] 25, conversation retrieved 2629.350 2631.500 2524.000 2764.000 68.200 2752.500
coldlaunch.[ConversationService] 26, conversation retrieved 2633.850 2634.500 2526.000 2768.000 67.443 2756.500
coldlaunch.[ConversationService] 27, conversation retrieved 2647.800 2653.000 2537.000 2832.000 75.977 2801.500
coldlaunch.[ConversationService] 28, conversation retrieved 2653.350 2658.500 2540.000 2834.000 75.060 2804.000
coldlaunch.[ConversationService] 29, conversation retrieved 2681.050 2679.000 2542.000 2836.000 74.791 2816.500
coldlaunch.[ConversationService] 30, conversation retrieved 2687.550 2682.000 2546.000 2840.000 78.514 2836.500
coldlaunch.[ConversationClient] 4, conversation retrieved 2663.350 2659.000 2563.000 2900.000 73.255 2822.000
coldlaunch.[ConversationService] 31, conversation retrieved 2697.150 2692.000 2580.000 2843.000 77.562 2840.000
coldlaunch.[ConversationService] 32, conversation retrieved 2702.300 2696.000 2583.000 2845.000 78.822 2842.500
coldlaunch.[ConversationService] 33, conversation retrieved 2710.250 2715.000 2587.000 2848.000 78.433 2845.500
coldlaunch.[ConversationService] 34, conversation retrieved 2716.450 2727.500 2590.000 2853.000 78.922 2849.000
coldlaunch.[ConversationService] 35, conversation retrieved 2725.050 2730.500 2594.000 2862.000 77.573 2860.500
coldlaunch.[ConversationService] 36, conversation retrieved 2736.800 2744.000 2597.000 2944.000 89.458 2924.000
coldlaunch.[ConversationService] 37, conversation retrieved 2743.250 2747.000 2600.000 2947.000 87.500 2926.500
coldlaunch.[ConversationClient] 5, conversation retrieved 2745.100 2734.000 2630.000 2956.000 69.574 2897.500
coldlaunch.[ConversationService] All conversations retrieved 2796.900 2799.500 2656.000 3005.000 83.191 2970.500
coldlaunch.[ConversationClient] 6, conversation retrieved 2799.100 2795.000 2666.000 3010.000 67.135 2938.000
coldlaunch.[ConversationClient] 7, conversation retrieved 2878.900 2870.000 2761.000 3039.000 59.877 2997.500
coldlaunch.[ConversationClient] 8, conversation retrieved 2957.750 2952.500 2873.000 3103.000 56.852 3068.500
coldlaunch.[ConversationClient] 9, conversation retrieved 3050.300 3038.000 2956.000 3208.000 64.117 3167.000
coldlaunch.visuallyLoaded 3061.800 3049.000 2970.000 3220.000 64.258 3179.000
coldlaunch.contentInteractive 3387.650 3380.500 3294.000 3566.000 68.583 3516.000
coldlaunch.objectsInitEnd 3419.050 3410.000 3324.000 3597.000 68.483 3547.000
coldlaunch.[ConversationClient] 10, conversation retrieved 3424.200 3415.500 3330.000 3601.000 68.500 3552.000
coldlaunch.[ConversationClient] 11, conversation retrieved 3527.500 3512.500 3432.000 3701.000 70.645 3661.500
coldlaunch.[ConversationClient] 12, conversation retrieved 3611.900 3592.500 3513.000 3789.000 73.180 3752.000
coldlaunch.[ConversationClient] 13, conversation retrieved 3762.550 3739.000 3657.000 3944.000 75.146 3905.500
coldlaunch.[ConversationClient] 14, conversation retrieved 3833.250 3812.500 3725.000 4009.000 73.915 3973.000
coldlaunch.[ConversationClient] 15, conversation retrieved 3898.700 3873.000 3785.000 4074.000 75.198 4040.500
coldlaunch.[ConversationClient] 16, conversation retrieved 3972.000 3946.500 3876.000 4157.000 74.804 4118.000
coldlaunch.[ConversationClient] 17, conversation retrieved 4038.150 4014.500 3935.000 4228.000 75.906 4186.000
coldlaunch.[ConversationClient] 18, conversation retrieved 4102.850 4086.000 3997.000 4287.000 73.924 4245.500
coldlaunch.[ConversationClient] 19, conversation retrieved 4172.050 4152.500 4060.000 4352.000 72.512 4313.000
coldlaunch.[ConversationClient] 20, conversation retrieved 4252.500 4234.500 4142.000 4425.000 72.297 4397.500
coldlaunch.[ConversationClient] 21, conversation retrieved 4318.450 4293.000 4209.000 4486.000 70.959 4457.000
coldlaunch.[ConversationClient] 22, conversation retrieved 4387.950 4372.000 4275.000 4551.000 71.128 4526.000
coldlaunch.[ConversationClient] 23, conversation retrieved 4464.550 4447.000 4359.000 4638.000 70.746 4603.000
coldlaunch.[ConversationClient] 24, conversation retrieved 4527.650 4510.500 4417.000 4691.000 68.670 4661.000
coldlaunch.[ConversationClient] 25, conversation retrieved 4598.750 4582.500 4490.000 4774.000 70.107 4737.000
coldlaunch.[ConversationClient] 26, conversation retrieved 4664.950 4650.500 4556.000 4840.000 70.516 4805.000
coldlaunch.[ConversationClient] 27, conversation retrieved 4731.350 4715.500 4614.000 4902.000 71.094 4868.500
coldlaunch.[ConversationClient] 28, conversation retrieved 4796.600 4778.500 4677.000 4984.000 74.378 4943.500
coldlaunch.[ConversationClient] 29, conversation retrieved 4864.650 4844.500 4744.000 5059.000 76.637 5019.500
coldlaunch.[ConversationClient] 30, conversation retrieved 4935.650 4916.000 4808.000 5149.000 81.250 5106.000
coldlaunch.[ConversationClient] 31, conversation retrieved 5010.250 4983.000 4881.000 5224.000 82.763 5179.500
coldlaunch.[ConversationClient] 32, conversation retrieved 5079.100 5051.000 4942.000 5302.000 86.555 5257.500
coldlaunch.[ConversationClient] 33, conversation retrieved 5144.400 5117.000 5013.000 5371.000 85.965 5317.500
coldlaunch.[ConversationClient] 34, conversation retrieved 5214.550 5185.000 5073.000 5437.000 86.915 5383.500
coldlaunch.[ConversationClient] 35, conversation retrieved 5286.350 5247.000 5144.000 5539.000 94.329 5482.000
coldlaunch.[ConversationClient] 36, conversation retrieved 5351.700 5316.500 5211.000 5606.000 95.034 5548.500
coldlaunch.[ConversationClient] 37, conversation retrieved 5417.850 5385.000 5279.000 5683.000 96.955 5623.000
coldlaunch.[ConversationClient] all conversations retrieved 5484.350 5454.500 5346.000 5750.000 94.235 5687.000
coldlaunch.fullyLoaded 5497.750 5467.000 5355.000 5765.000 95.023 5701.500
coldlaunch.uss 20.335 20.300 20.200 21.400 0.248 20.850
coldlaunch.pss 24.830 24.800 24.700 25.700 0.203 25.250
coldlaunch.rss 40.745 40.700 40.600 41.800 0.244 41.250

@azasypkin
Copy link
Contributor Author

5th approach: ConversationClient ---LocalBroadcastChannel---> ConversationService (window) ---BC---> MobileMessageShim (iframe)

Here is the same as 4th approach, but I've replaced MessageChannel part with LocalBroadcastChannel custom endpoint. Looks better we've saved more than 1000ms, not bad.

Again here is something weird going on between connection and first method call - 100ms is too much for same window communication.

Also here we see that someone competes with Draft.request for the resources - iframe connection handshake maybe (we need performance marks inside bridge)?

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1243.050 1250.000 1159.000 1332.000 47.583 1318.500
coldlaunch.willRenderThreads 1283.600 1289.000 1200.000 1372.000 46.867 1359.000
coldlaunch.[ConversationClient] start retrieving conversations 1284.200 1289.000 1201.000 1373.000 46.887 1360.000
coldlaunch.navigationInteractive 1287.500 1292.500 1204.000 1375.000 46.871 1362.500
coldlaunch.[ConversationService] client connected 1289.900 1294.500 1206.000 1377.000 47.002 1365.000
coldlaunch.[ConversationService] start retrieving conversations 1421.350 1421.500 1335.000 1481.000 37.131 1470.500
coldlaunch.iframe is ready too bootstrap 1603.500 1610.000 1521.000 1692.000 44.439 1672.500
coldlaunch.[ConversationService] drafts index loaded 1644.000 1647.500 1560.000 1736.000 46.689 1719.000
coldlaunch.[MozMobileMessageShim] client connected 1712.000 1671.500 1564.000 1962.000 121.291 1950.000
coldlaunch.[MozMobileMessageShim] start retrieving conversations 1834.000 1893.500 1577.000 2024.000 140.918 2011.500
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 1939.600 1948.000 1844.000 2055.000 65.830 2047.000
coldlaunch.[ConversationService] 1, conversation retrieved 1988.600 1999.500 1873.000 2118.000 73.737 2112.500
coldlaunch.[ConversationClient] 1, conversation retrieved 1994.150 2004.000 1878.000 2123.000 73.075 2117.000
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 2002.550 1992.500 1865.000 2127.000 76.053 2122.000
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 2005.950 1994.000 1867.000 2129.000 77.680 2126.000
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 2034.650 2044.000 1885.000 2142.000 79.079 2139.000
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 2057.800 2064.000 1888.000 2232.000 87.226 2198.500
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 2096.350 2091.000 1980.000 2239.000 71.181 2236.500
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 2111.100 2105.000 1997.000 2244.000 67.613 2240.500
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 2138.550 2131.000 2000.000 2295.000 75.927 2271.000
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 2143.400 2135.000 2005.000 2305.000 76.233 2278.000
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 2174.100 2175.500 2020.000 2307.000 77.075 2296.000
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 2210.300 2208.500 2097.000 2310.000 61.258 2300.500
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 2222.600 2218.000 2108.000 2318.000 57.823 2309.500
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 2230.650 2224.500 2110.000 2319.000 55.899 2310.500
coldlaunch.[ConversationService] 2, conversation retrieved 2223.150 2236.500 2088.000 2332.000 67.510 2330.500
coldlaunch.[ConversationClient] 2, conversation retrieved 2225.700 2239.500 2090.000 2334.000 67.520 2332.500
coldlaunch.[ConversationService] 3, conversation retrieved 2241.600 2255.000 2105.000 2349.000 67.176 2348.000
coldlaunch.[ConversationClient] 3, conversation retrieved 2245.850 2258.000 2109.000 2353.000 66.943 2352.000
coldlaunch.[ConversationService] 4, conversation retrieved 2286.400 2287.500 2144.000 2400.000 67.205 2382.500
coldlaunch.[ConversationClient] 4, conversation retrieved 2290.650 2291.500 2148.000 2404.000 67.348 2386.500
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 2274.550 2267.500 2179.000 2425.000 61.780 2409.000
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 2283.800 2275.000 2207.000 2426.000 58.714 2410.500
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 2295.500 2290.500 2209.000 2429.000 64.281 2425.500
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 2325.400 2309.000 2211.000 2521.000 81.731 2478.500
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 2327.300 2310.500 2212.000 2523.000 82.073 2480.000
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 2376.100 2352.000 2214.000 2623.000 120.827 2619.500
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2436.350 2431.000 2216.000 2625.000 124.801 2621.000
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2458.450 2438.000 2257.000 2627.000 120.039 2624.000
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2479.400 2483.000 2262.000 2649.000 120.361 2639.500
coldlaunch.[ConversationService] 5, conversation retrieved 2327.750 2335.500 2160.000 2483.000 75.018 2451.000
coldlaunch.[ConversationClient] 5, conversation retrieved 2333.250 2340.500 2165.000 2487.000 75.401 2455.000
coldlaunch.[ConversationService] 6, conversation retrieved 2377.350 2360.500 2304.000 2515.000 60.236 2507.000
coldlaunch.[ConversationClient] 6, conversation retrieved 2382.550 2365.500 2310.000 2519.000 60.041 2511.500
coldlaunch.[ConversationService] 7, conversation retrieved 2407.150 2399.000 2325.000 2548.000 66.897 2540.500
coldlaunch.[ConversationClient] 7, conversation retrieved 2409.800 2401.500 2327.000 2554.000 67.315 2544.500
coldlaunch.[ConversationService] 8, conversation retrieved 2448.750 2431.500 2336.000 2652.000 84.405 2608.000
coldlaunch.[ConversationClient] 8, conversation retrieved 2451.650 2434.000 2339.000 2654.000 84.419 2611.500
coldlaunch.[ConversationService] 9, conversation retrieved 2463.750 2445.000 2350.000 2665.000 85.120 2624.500
coldlaunch.[ConversationClient] 9, conversation retrieved 2466.400 2447.500 2353.000 2667.000 85.081 2627.000
coldlaunch.visuallyLoaded 2475.350 2455.500 2360.000 2675.000 86.002 2635.500
coldlaunch.[ConversationService] 10, conversation retrieved 2627.850 2557.000 2421.000 3139.000 215.731 3133.500
coldlaunch.[ConversationClient] 10, conversation retrieved 2631.350 2560.000 2424.000 3150.000 216.983 3141.500
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 2593.150 2625.000 2353.000 2816.000 119.065 2802.500
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 2614.850 2630.500 2413.000 2820.000 110.116 2805.500
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 2637.650 2634.000 2416.000 2856.000 114.057 2840.000
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 2658.750 2646.500 2500.000 2857.000 93.810 2841.500
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 2660.850 2648.500 2502.000 2860.000 93.589 2844.000
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 2757.400 2666.000 2503.000 3360.000 229.244 3338.000
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 2894.050 2777.000 2504.000 3363.000 280.215 3348.000
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 2934.050 2816.500 2505.000 3387.000 294.172 3376.500
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 2970.450 2852.500 2507.000 3391.000 299.747 3380.000
coldlaunch.[ConversationService] 11, conversation retrieved 2764.650 2681.500 2459.000 3171.000 246.906 3164.000
coldlaunch.[ConversationClient] 11, conversation retrieved 2772.600 2688.500 2467.000 3174.000 246.687 3167.000
coldlaunch.[ConversationService] 12, conversation retrieved 2820.500 2732.000 2506.000 3189.000 242.169 3183.500
coldlaunch.[ConversationClient] 12, conversation retrieved 2823.550 2734.500 2509.000 3192.000 242.470 3186.000
coldlaunch.[ConversationService] 13, conversation retrieved 2860.900 2770.500 2518.000 3202.000 237.895 3197.000
coldlaunch.[ConversationClient] 13, conversation retrieved 2863.850 2773.000 2521.000 3207.000 238.516 3202.500
coldlaunch.contentInteractive 3068.750 3021.000 2880.000 3430.000 146.760 3425.000
coldlaunch.objectsInitEnd 3102.950 3061.000 2910.000 3461.000 146.973 3459.500
coldlaunch.[ConversationService] 14, conversation retrieved 3038.150 3113.500 2612.000 3309.000 204.223 3294.000
coldlaunch.[ConversationClient] 14, conversation retrieved 3042.250 3117.500 2615.000 3315.000 205.194 3300.000
coldlaunch.[ConversationService] 15, conversation retrieved 3088.700 3153.000 2680.000 3334.000 188.300 3317.000
coldlaunch.[ConversationClient] 15, conversation retrieved 3091.950 3156.000 2682.000 3337.000 189.027 3320.000
coldlaunch.[ConversationService] 16, conversation retrieved 3136.550 3171.000 2692.000 3351.000 175.459 3348.500
coldlaunch.[ConversationClient] 16, conversation retrieved 3140.700 3175.000 2694.000 3354.000 175.270 3351.500
coldlaunch.[ConversationService] 17, conversation retrieved 3168.400 3188.000 2710.000 3365.000 151.719 3362.000
coldlaunch.[ConversationClient] 17, conversation retrieved 3172.600 3192.000 2712.000 3371.000 151.100 3366.000
coldlaunch.[ConversationService] 18, conversation retrieved 3190.850 3206.000 2721.000 3383.000 152.010 3377.000
coldlaunch.[ConversationClient] 18, conversation retrieved 3193.750 3208.500 2723.000 3386.000 152.049 3379.500
coldlaunch.[ConversationService] 19, conversation retrieved 3232.500 3232.500 2731.000 3547.000 181.223 3544.000
coldlaunch.[ConversationClient] 19, conversation retrieved 3236.500 3236.500 2734.000 3550.000 181.818 3548.500
coldlaunch.[ConversationService] 20, conversation retrieved 3305.850 3366.500 2744.000 3572.000 196.005 3568.500
coldlaunch.[ConversationClient] 20, conversation retrieved 3309.450 3373.500 2748.000 3575.000 196.583 3575.000
coldlaunch.[ConversationService] 21, conversation retrieved 3328.400 3401.000 2757.000 3591.000 199.413 3590.500
coldlaunch.[ConversationClient] 21, conversation retrieved 3333.300 3404.500 2761.000 3593.000 200.595 3593.000
coldlaunch.[ConversationService] 22, conversation retrieved 3361.100 3425.000 2770.000 3604.000 199.966 3603.500
coldlaunch.[ConversationClient] 22, conversation retrieved 3364.750 3427.500 2773.000 3613.000 200.180 3609.000
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 3150.150 3276.500 2508.000 3527.000 288.339 3475.000
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 3191.650 3301.000 2509.000 3539.000 286.727 3536.000
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 3220.450 3320.500 2511.000 3541.000 280.824 3538.500
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 3295.600 3336.500 2821.000 3544.000 174.796 3542.000
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 3299.000 3338.000 2822.000 3548.000 175.071 3547.500
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 3349.300 3359.000 2824.000 3684.000 196.762 3617.500
coldlaunch.[ConversationService] 23, conversation retrieved 3436.450 3495.500 2782.000 3679.000 209.347 3653.000
coldlaunch.[ConversationClient] 23, conversation retrieved 3439.350 3501.500 2784.000 3682.000 209.627 3655.500
coldlaunch.[ConversationService] 24, conversation retrieved 3466.900 3528.500 2793.000 3696.000 220.224 3690.000
coldlaunch.[ConversationClient] 24, conversation retrieved 3471.850 3535.000 2795.000 3706.000 221.557 3696.500
coldlaunch.[ConversationService] 25, conversation retrieved 3501.550 3561.000 2810.000 3723.000 224.017 3712.000
coldlaunch.[ConversationClient] 25, conversation retrieved 3504.550 3564.000 2812.000 3725.000 224.492 3718.500
coldlaunch.[ConversationService] 26, conversation retrieved 3592.250 3576.500 3348.000 3740.000 107.711 3738.000
coldlaunch.[ConversationClient] 26, conversation retrieved 3596.150 3582.000 3352.000 3747.000 108.758 3747.000
coldlaunch.[ConversationService] 27, conversation retrieved 3612.200 3591.500 3369.000 3783.000 114.457 3775.500
coldlaunch.[ConversationClient] 27, conversation retrieved 3614.300 3594.000 3371.000 3785.000 114.619 3777.500
coldlaunch.[ConversationService] 28, conversation retrieved 3666.250 3659.500 3380.000 3991.000 136.256 3895.000
coldlaunch.[ConversationClient] 28, conversation retrieved 3668.800 3661.500 3383.000 3994.000 136.341 3898.000
coldlaunch.[ConversationService] 29, conversation retrieved 3716.400 3736.000 3391.000 4009.000 142.276 3970.500
coldlaunch.[ConversationClient] 29, conversation retrieved 3719.500 3740.000 3393.000 4023.000 143.748 3979.000
coldlaunch.[ConversationService] 30, conversation retrieved 3764.650 3769.000 3409.000 4151.000 164.321 4104.000
coldlaunch.[ConversationClient] 30, conversation retrieved 3767.300 3772.500 3411.000 4154.000 164.552 4106.500
coldlaunch.[ConversationService] 31, conversation retrieved 3787.850 3792.500 3420.000 4175.000 161.507 4124.000
coldlaunch.[ConversationClient] 31, conversation retrieved 3790.600 3795.000 3422.000 4177.000 161.543 4126.000
coldlaunch.[MozMobileMessageShim] all conversations retrieved 3721.800 3727.500 3407.000 4171.000 174.518 4118.000
coldlaunch.[ConversationService] 32, conversation retrieved 3878.000 3864.500 3430.000 4185.000 156.045 4135.000
coldlaunch.[ConversationClient] 32, conversation retrieved 3880.950 3867.000 3432.000 4189.000 156.076 4138.000
coldlaunch.[ConversationService] 33, conversation retrieved 3901.550 3918.500 3441.000 4199.000 158.929 4151.000
coldlaunch.[ConversationClient] 33, conversation retrieved 3903.900 3921.000 3443.000 4201.000 158.964 4153.000
coldlaunch.[ConversationService] 34, conversation retrieved 3932.400 3964.000 3452.000 4211.000 163.131 4163.000
coldlaunch.[ConversationClient] 34, conversation retrieved 3934.850 3966.500 3455.000 4213.000 162.935 4165.000
coldlaunch.[ConversationService] 35, conversation retrieved 3986.100 4014.000 3753.000 4224.000 124.193 4179.000
coldlaunch.[ConversationClient] 35, conversation retrieved 3988.900 4016.500 3756.000 4226.000 124.403 4181.000
coldlaunch.[ConversationService] 36, conversation retrieved 3999.950 4029.000 3764.000 4234.000 124.802 4190.000
coldlaunch.[ConversationClient] 36, conversation retrieved 4003.250 4031.500 3766.000 4237.000 125.485 4192.500
coldlaunch.[ConversationService] 37, conversation retrieved 4042.650 4053.000 3774.000 4358.000 145.894 4320.500
coldlaunch.[ConversationClient] 37, conversation retrieved 4044.450 4055.500 3776.000 4360.000 145.873 4322.500
coldlaunch.[ConversationService] All conversations retrieved 4335.850 4355.000 4180.000 4610.000 118.761 4544.000
coldlaunch.[ConversationClient] all conversations retrieved 4338.850 4357.500 4182.000 4612.000 118.566 4548.000
coldlaunch.fullyLoaded 4350.700 4371.000 4195.000 4623.000 119.071 4561.500
coldlaunch.uss 21.340 21.500 20.500 22.000 0.380 21.900
coldlaunch.pss 25.910 26.050 25.200 26.500 0.382 26.500
coldlaunch.rss 41.670 41.800 40.900 42.300 0.361 42.200

@azasypkin
Copy link
Contributor Author

6th approach: ConversationClient ---LocalBroadcastChannel---> ConversationService (window) ---LocalBroadcastChannel---> MobileMessageShim (iframe)

Here I tried to replace BroadcastChannel with LocalBroadcastChannel, so now only "direct" javascript is involved into communication. To check if BroadcastChannel has any negative impact.

Saved ~250ms more for the full list, not impressive. Still ton of time is spent on loading and connection with iframe service.

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1247.350 1248.500 1157.000 1364.000 58.025 1359.500
coldlaunch.willRenderThreads 1288.300 1292.500 1198.000 1404.000 58.462 1400.500
coldlaunch.[ConversationClient] start retrieving conversations 1288.800 1292.500 1198.000 1405.000 58.410 1401.000
coldlaunch.navigationInteractive 1292.050 1296.000 1201.000 1408.000 58.537 1404.000
coldlaunch.[ConversationService] client connected 1294.300 1298.500 1203.000 1411.000 58.610 1406.500
coldlaunch.[ConversationService] start retrieving conversations 1427.550 1426.500 1360.000 1518.000 42.151 1514.500
coldlaunch.iframe is ready too bootstrap 1615.750 1614.500 1534.000 1721.000 55.236 1721.000
coldlaunch.[MozMobileMessageShim] client connected 1633.350 1632.500 1550.000 1739.000 55.894 1738.500
coldlaunch.[MozMobileMessageShim] start retrieving conversations 1643.400 1641.500 1560.000 1749.000 56.368 1749.000
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 1818.700 1842.500 1593.000 2004.000 122.813 1998.000
coldlaunch.[ConversationService] 1, conversation retrieved 1827.450 1851.500 1599.000 2013.000 123.492 2007.000
coldlaunch.[ConversationService] drafts index loaded 1681.350 1668.500 1589.000 1810.000 66.369 1806.000
coldlaunch.[ConversationClient] 1, conversation retrieved 1834.250 1857.500 1605.000 2019.000 123.263 2014.000
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 2041.300 2040.500 1868.000 2204.000 85.648 2198.000
coldlaunch.[ConversationService] 2, conversation retrieved 2057.550 2058.000 1878.000 2222.000 88.749 2217.000
coldlaunch.[ConversationClient] 2, conversation retrieved 2075.800 2089.500 1906.000 2238.000 90.488 2233.000
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 2057.050 2050.000 1870.000 2213.000 79.979 2203.500
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 2090.400 2075.500 2008.000 2227.000 68.640 2221.500
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 2139.750 2145.000 2011.000 2347.000 99.286 2339.000
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 2166.300 2167.500 2014.000 2352.000 105.298 2345.500
coldlaunch.[ConversationService] 3, conversation retrieved 2077.200 2071.000 1886.000 2225.000 79.817 2220.000
coldlaunch.[ConversationService] 4, conversation retrieved 2115.700 2091.500 2039.000 2269.000 69.992 2248.500
coldlaunch.[ConversationService] 5, conversation retrieved 2173.500 2177.500 2043.000 2384.000 104.051 2379.000
coldlaunch.[ConversationService] 6, conversation retrieved 2203.900 2214.000 2049.000 2388.000 108.225 2383.500
coldlaunch.[ConversationClient] 3, conversation retrieved 2110.600 2110.500 1948.000 2251.000 74.963 2246.000
coldlaunch.[ConversationClient] 4, conversation retrieved 2155.000 2135.000 2067.000 2310.000 69.719 2286.000
coldlaunch.[ConversationClient] 5, conversation retrieved 2219.500 2225.500 2077.000 2422.000 100.069 2418.000
coldlaunch.[ConversationClient] 6, conversation retrieved 2250.550 2263.000 2085.000 2430.000 103.228 2427.000
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 2190.750 2223.000 2019.000 2357.000 106.981 2350.000
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 2213.650 2232.000 2022.000 2360.000 96.754 2353.500
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 2218.700 2236.000 2027.000 2364.000 95.994 2358.500
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 2222.000 2239.000 2030.000 2367.000 96.119 2361.000
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 2276.200 2254.500 2034.000 2545.000 108.769 2487.000
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 2304.300 2264.500 2161.000 2552.000 97.954 2494.000
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 2363.250 2351.000 2193.000 2640.000 130.394 2611.000
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 2495.900 2552.500 2229.000 2760.000 159.977 2749.500
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 2536.650 2574.000 2231.000 2762.000 157.164 2752.000
coldlaunch.[ConversationService] 7, conversation retrieved 2226.800 2254.500 2053.000 2392.000 107.580 2387.500
coldlaunch.[ConversationService] 8, conversation retrieved 2249.700 2261.500 2055.000 2395.000 94.939 2390.500
coldlaunch.[ConversationService] 9, conversation retrieved 2253.050 2265.000 2062.000 2398.000 94.609 2393.500
coldlaunch.[ConversationService] 10, conversation retrieved 2255.550 2267.500 2065.000 2400.000 94.438 2395.500
coldlaunch.[ConversationService] 11, conversation retrieved 2308.500 2289.000 2072.000 2569.000 105.544 2510.500
coldlaunch.[ConversationService] 12, conversation retrieved 2329.950 2293.500 2191.000 2571.000 95.348 2516.000
coldlaunch.[ConversationService] 13, conversation retrieved 2389.200 2376.500 2218.000 2671.000 130.939 2639.500
coldlaunch.[ConversationService] 14, conversation retrieved 2522.800 2584.000 2256.000 2790.000 162.609 2779.500
coldlaunch.[ConversationService] 15, conversation retrieved 2564.000 2603.500 2258.000 2793.000 160.093 2782.500
coldlaunch.[ConversationClient] 7, conversation retrieved 2283.400 2285.000 2097.000 2442.000 100.763 2440.500
coldlaunch.[ConversationClient] 8, conversation retrieved 2311.700 2312.500 2146.000 2451.000 86.994 2450.500
coldlaunch.[ConversationClient] 9, conversation retrieved 2322.700 2323.000 2157.000 2460.000 87.176 2460.000
coldlaunch.visuallyLoaded 2330.200 2330.500 2166.000 2469.000 87.241 2468.500
coldlaunch.[ConversationClient] 10, conversation retrieved 2387.100 2390.500 2222.000 2527.000 87.031 2525.500
coldlaunch.[ConversationClient] 11, conversation retrieved 2430.950 2427.000 2237.000 2600.000 82.637 2570.000
coldlaunch.[ConversationClient] 12, conversation retrieved 2463.200 2450.000 2359.000 2624.000 70.616 2593.000
coldlaunch.[ConversationClient] 13, conversation retrieved 2507.600 2480.500 2377.000 2698.000 89.651 2666.500
coldlaunch.[ConversationClient] 14, conversation retrieved 2596.450 2627.500 2400.000 2815.000 117.809 2807.000
coldlaunch.[ConversationClient] 15, conversation retrieved 2636.500 2661.000 2409.000 2861.000 126.047 2835.000
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 2594.100 2610.500 2233.000 2764.000 128.940 2762.000
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 2647.950 2637.500 2445.000 3015.000 121.801 2894.500
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 2651.150 2640.000 2446.000 3019.000 122.429 2897.500
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 2654.550 2646.000 2448.000 3022.000 122.341 2900.000
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2725.500 2665.500 2457.000 3215.000 188.991 3185.500
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2760.950 2676.500 2578.000 3223.000 195.760 3191.000
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2863.700 2755.500 2587.000 3343.000 256.009 3301.500
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 3110.400 3238.500 2615.000 3484.000 287.416 3457.000
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 3178.200 3272.500 2617.000 3494.000 266.439 3470.500
coldlaunch.[ConversationService] 16, conversation retrieved 2623.250 2644.000 2260.000 2801.000 132.543 2798.500
coldlaunch.[ConversationService] 17, conversation retrieved 2677.050 2670.000 2462.000 3044.000 123.110 2924.000
coldlaunch.[ConversationService] 18, conversation retrieved 2679.400 2672.000 2463.000 3047.000 123.271 2926.500
coldlaunch.[ConversationService] 19, conversation retrieved 2681.900 2675.000 2465.000 3050.000 123.321 2929.000
coldlaunch.[ConversationService] 20, conversation retrieved 2752.650 2689.000 2480.000 3250.000 189.825 3215.500
coldlaunch.[ConversationService] 21, conversation retrieved 2787.600 2700.500 2612.000 3254.000 196.883 3219.000
coldlaunch.[ConversationService] 22, conversation retrieved 2890.000 2782.000 2614.000 3376.000 258.861 3334.000
coldlaunch.[ConversationService] 23, conversation retrieved 3137.750 3268.000 2637.000 3520.000 291.141 3490.000
coldlaunch.[ConversationService] 24, conversation retrieved 3204.250 3295.000 2640.000 3523.000 268.339 3500.500
coldlaunch.[ConversationClient] 16, conversation retrieved 2682.200 2707.500 2418.000 2879.000 115.465 2853.000
coldlaunch.[ConversationClient] 17, conversation retrieved 2736.850 2728.500 2532.000 3081.000 118.167 2986.500
coldlaunch.[ConversationClient] 18, conversation retrieved 2753.450 2740.000 2540.000 3099.000 122.672 3003.500
coldlaunch.[ConversationClient] 19, conversation retrieved 2772.750 2758.000 2552.000 3112.000 122.908 3014.500
coldlaunch.[ConversationClient] 20, conversation retrieved 2855.300 2807.000 2564.000 3289.000 171.812 3252.000
coldlaunch.[ConversationClient] 21, conversation retrieved 2897.350 2826.000 2693.000 3305.000 171.522 3270.000
coldlaunch.[ConversationClient] 22, conversation retrieved 2995.400 2919.500 2758.000 3412.000 220.087 3368.500
coldlaunch.[ConversationClient] 23, conversation retrieved 3212.100 3327.500 2781.000 3557.000 252.891 3526.000
coldlaunch.[ConversationClient] 24, conversation retrieved 3279.900 3350.500 2792.000 3575.000 232.117 3543.500
coldlaunch.contentInteractive 3076.600 3095.500 2800.000 3260.000 109.038 3234.000
coldlaunch.objectsInitEnd 3108.150 3126.500 2829.000 3290.000 109.125 3264.500
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 3283.600 3317.500 2663.000 3497.000 181.585 3476.500
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 3334.550 3332.500 3125.000 3501.000 93.291 3480.000
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 3337.700 3336.000 3129.000 3504.000 93.661 3483.000
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 3341.350 3344.500 3131.000 3506.000 93.732 3485.500
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 3381.400 3360.000 3133.000 3663.000 109.823 3586.500
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 3401.600 3382.000 3269.000 3666.000 96.544 3589.500
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 3458.800 3450.500 3287.000 3735.000 126.654 3705.500
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 3585.600 3623.000 3289.000 3882.000 172.022 3848.500
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 3622.950 3660.000 3333.000 3893.000 164.390 3860.000
coldlaunch.[ConversationService] 25, conversation retrieved 3310.150 3344.000 2689.000 3526.000 182.821 3503.500
coldlaunch.[ConversationService] 26, conversation retrieved 3360.650 3362.000 3150.000 3528.000 94.747 3505.500
coldlaunch.[ConversationService] 27, conversation retrieved 3363.000 3365.000 3152.000 3530.000 95.057 3507.500
coldlaunch.[ConversationService] 28, conversation retrieved 3365.150 3367.500 3154.000 3532.000 95.037 3509.500
coldlaunch.[ConversationService] 29, conversation retrieved 3404.850 3383.500 3155.000 3691.000 111.915 3616.000
coldlaunch.[ConversationService] 30, conversation retrieved 3425.250 3404.500 3290.000 3695.000 99.001 3620.000
coldlaunch.[ConversationService] 31, conversation retrieved 3482.250 3471.500 3305.000 3766.000 129.083 3732.000
coldlaunch.[ConversationService] 32, conversation retrieved 3610.550 3653.000 3306.000 3914.000 175.937 3879.000
coldlaunch.[ConversationService] 33, conversation retrieved 3645.850 3686.000 3356.000 3918.000 166.706 3887.500
coldlaunch.[ConversationClient] 25, conversation retrieved 3377.800 3396.500 2835.000 3591.000 161.582 3560.000
coldlaunch.[ConversationClient] 26, conversation retrieved 3427.850 3413.500 3236.000 3603.000 89.169 3573.500
coldlaunch.[ConversationClient] 27, conversation retrieved 3439.450 3428.000 3248.000 3615.000 89.896 3584.500
coldlaunch.[ConversationClient] 28, conversation retrieved 3450.250 3441.000 3257.000 3624.000 90.027 3594.000
coldlaunch.[ConversationClient] 29, conversation retrieved 3491.150 3488.000 3272.000 3721.000 100.066 3679.500
coldlaunch.[ConversationClient] 30, conversation retrieved 3515.700 3515.000 3375.000 3734.000 87.904 3692.000
coldlaunch.[ConversationClient] 31, conversation retrieved 3566.150 3564.500 3384.000 3794.000 108.015 3772.500
coldlaunch.[ConversationClient] 32, conversation retrieved 3667.350 3681.500 3392.000 3939.000 148.122 3902.500
coldlaunch.[ConversationClient] 33, conversation retrieved 3702.500 3727.500 3455.000 3953.000 141.775 3917.000
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 3680.550 3696.000 3353.000 3904.000 145.910 3869.000
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 3726.100 3748.500 3514.000 3906.000 102.509 3877.500
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 3729.950 3750.500 3516.000 3908.000 103.248 3879.500
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 3732.800 3756.500 3517.000 3910.000 103.667 3881.500
coldlaunch.[ConversationService] 34, conversation retrieved 3699.300 3711.500 3372.000 3921.000 146.409 3891.000
coldlaunch.[ConversationService] 35, conversation retrieved 3743.850 3767.500 3531.000 3922.000 102.610 3893.000
coldlaunch.[ConversationService] 36, conversation retrieved 3745.750 3770.500 3533.000 3924.000 102.573 3895.000
coldlaunch.[ConversationService] 37, conversation retrieved 3747.550 3772.500 3534.000 3926.000 102.719 3897.000
coldlaunch.[ConversationClient] 34, conversation retrieved 3750.950 3773.500 3463.000 3972.000 130.268 3933.000
coldlaunch.[ConversationClient] 35, conversation retrieved 3795.350 3803.500 3606.000 3982.000 95.927 3946.500
coldlaunch.[ConversationClient] 36, conversation retrieved 3804.900 3814.500 3614.000 3991.000 96.342 3955.500
coldlaunch.[ConversationClient] 37, conversation retrieved 3814.700 3828.500 3622.000 3999.000 97.121 3967.500
coldlaunch.[MozMobileMessageShim] all conversations retrieved 4137.350 4147.000 3936.000 4295.000 92.414 4284.000
coldlaunch.[ConversationService] All conversations retrieved 4142.300 4151.500 3939.000 4299.000 91.213 4288.000
coldlaunch.[ConversationClient] all conversations retrieved 4145.300 4154.500 3942.000 4301.000 91.023 4290.000
coldlaunch.fullyLoaded 4159.050 4169.500 3964.000 4315.000 90.873 4304.000
coldlaunch.uss 21.545 21.800 20.300 22.000 0.415 21.950
coldlaunch.rss 41.865 42.100 40.600 42.300 0.414 42.250
coldlaunch.pss 26.115 26.300 24.900 26.600 0.408 26.550

@wilsonpage
Copy link
Contributor

Thank you for narrowing down where the time is being spent here Oleg. I want to get these core use-cases inside a test app in the Bridge repo so we can keep an eye on the areas we need to target in Gecko/Gaia. We really need platform guidance on this!

@azasypkin
Copy link
Contributor Author

7th approach: ConversationClient ---window(MessageChannel)---> ConversationService (window) ---window(MessageChannel)---> MobileMessageShim (window)

Here all services and clients are in the same window, no iframe, no BroadcastChannel, only two MessageChannel are used.

Sooo, numbers are quite bad, something is definitely wrong here. We don't create two MessageChannels at the same time, they are created consequently.

Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1324.700 1319.500 1165.000 1498.000 68.862 1458.500
coldlaunch.willRenderThreads 1369.000 1366.500 1206.000 1542.000 68.423 1501.500
coldlaunch.[ConversationClient] start retrieving conversations 1369.700 1367.500 1206.000 1543.000 68.557 1502.500
coldlaunch.navigationInteractive 1372.100 1370.000 1209.000 1545.000 68.383 1504.500
coldlaunch.[ConversationService] client connected 1514.650 1490.500 1406.000 1724.000 84.845 1683.000
coldlaunch.[ConversationService] start retrieving conversations 1769.150 1774.000 1493.000 2058.000 151.438 2011.500
coldlaunch.[MozMobileMessageShim] client connected 1826.950 1792.500 1692.000 2074.000 105.018 2027.000
coldlaunch.[MozMobileMessageShim] start retrieving conversations 1872.550 1831.500 1707.000 2143.000 104.921 2091.500
coldlaunch.[ConversationService] drafts index loaded 1897.500 1846.500 1736.000 2147.000 116.203 2117.000
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 1915.400 1879.500 1739.000 2171.000 100.940 2116.500
coldlaunch.[ConversationService] 1, conversation retrieved 1962.100 1935.000 1748.000 2226.000 108.915 2171.500
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 1937.450 1903.500 1761.000 2188.000 101.773 2138.500
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 1941.400 1907.500 1764.000 2190.000 101.808 2140.500
coldlaunch.[ConversationClient] 1, conversation retrieved 2037.200 2024.500 1790.000 2285.000 110.908 2234.500
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 1952.850 1915.500 1850.000 2194.000 93.220 2144.000
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 1967.800 1940.500 1854.000 2199.000 92.601 2149.000
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 1974.100 1945.000 1864.000 2205.000 90.682 2153.500
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 1982.350 1954.000 1866.000 2208.000 90.080 2168.500
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 1986.800 1956.500 1869.000 2241.000 93.850 2186.000
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 1993.750 1964.000 1873.000 2243.000 94.108 2189.000
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 1997.750 1966.000 1875.000 2246.000 93.442 2191.500
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 2011.700 1971.000 1912.000 2251.000 91.170 2197.000
coldlaunch.[ConversationService] 2, conversation retrieved 2025.900 1994.000 1918.000 2267.000 93.545 2217.000
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 2029.050 2000.500 1916.000 2254.000 89.646 2200.500
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 2046.900 2026.000 1918.000 2257.000 101.399 2254.500
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 2055.500 2037.000 1920.000 2259.000 97.451 2256.500
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 2058.250 2040.000 1922.000 2262.000 98.180 2261.500
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 2074.450 2058.500 1924.000 2272.000 101.868 2268.500
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 2082.550 2061.000 1925.000 2384.000 115.429 2329.000
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 2100.050 2079.500 1927.000 2387.000 118.816 2332.000
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 2108.700 2099.000 1929.000 2389.000 115.328 2334.000
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2172.000 2128.000 1995.000 2584.000 139.689 2488.000
coldlaunch.[ConversationService] 3, conversation retrieved 2160.500 2136.500 1999.000 2407.000 102.205 2363.500
coldlaunch.[ConversationClient] 2, conversation retrieved 2222.750 2202.000 2051.000 2485.000 104.199 2423.000
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2184.200 2164.000 2022.000 2587.000 134.275 2490.500
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2192.700 2176.500 2024.000 2589.000 136.522 2492.500
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 2197.950 2178.500 2026.000 2591.000 134.188 2494.500
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 2200.100 2180.000 2029.000 2593.000 134.107 2496.500
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 2216.650 2188.000 2031.000 2599.000 130.664 2501.000
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 2222.200 2193.000 2033.000 2604.000 135.541 2532.500
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 2236.600 2197.000 2076.000 2607.000 129.550 2535.000
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 2241.400 2199.500 2078.000 2610.000 128.042 2538.000
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 2268.400 2214.000 2080.000 2792.000 152.369 2630.000
coldlaunch.[ConversationService] 4, conversation retrieved 2237.600 2218.500 2084.000 2483.000 104.170 2436.000
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 2284.250 2265.000 2141.000 2794.000 147.008 2633.000
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 2297.200 2281.000 2143.000 2796.000 151.159 2634.500
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 2303.100 2284.000 2145.000 2798.000 148.206 2636.500
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 2325.500 2286.000 2147.000 3201.000 222.213 2839.000
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 2342.500 2288.500 2150.000 3203.000 221.786 2861.500
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 2349.100 2291.000 2152.000 3206.000 225.269 2886.500
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 2361.650 2315.000 2154.000 3209.000 223.187 2890.000
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 2368.250 2317.500 2156.000 3212.000 221.148 2894.500
coldlaunch.[ConversationService] 5, conversation retrieved 2333.700 2305.000 2159.000 2582.000 111.464 2556.500
coldlaunch.[ConversationClient] 3, conversation retrieved 2340.300 2309.000 2163.000 2599.000 108.291 2566.500
coldlaunch.[MozMobileMessageShim] all conversations retrieved 2440.000 2372.000 2210.000 3333.000 225.974 2974.000
coldlaunch.[ConversationService] 6, conversation retrieved 2387.750 2370.000 2213.000 2619.000 101.160 2586.500
coldlaunch.[ConversationClient] 4, conversation retrieved 2396.400 2365.500 2226.000 2625.000 98.510 2594.500
coldlaunch.[ConversationService] 7, conversation retrieved 2446.350 2410.000 2250.000 2681.000 110.774 2657.000
coldlaunch.[ConversationClient] 5, conversation retrieved 2450.400 2416.500 2256.000 2695.000 107.694 2669.500
coldlaunch.[ConversationService] 8, conversation retrieved 2488.800 2457.000 2309.000 2708.000 110.269 2687.000
coldlaunch.[ConversationClient] 6, conversation retrieved 2498.650 2452.500 2317.000 2719.000 107.209 2693.000
coldlaunch.[ConversationService] 9, conversation retrieved 2544.650 2508.500 2373.000 2732.000 106.842 2728.000
coldlaunch.[ConversationClient] 7, conversation retrieved 2576.950 2532.000 2382.000 2793.000 107.496 2779.000
coldlaunch.[ConversationService] 10, conversation retrieved 2617.100 2587.500 2475.000 2812.000 107.530 2809.000
coldlaunch.[ConversationClient] 8, conversation retrieved 2661.550 2622.000 2479.000 2883.000 109.590 2870.500
coldlaunch.[ConversationService] 11, conversation retrieved 2712.350 2687.500 2556.000 2900.000 101.885 2892.000
coldlaunch.[ConversationClient] 9, conversation retrieved 2752.750 2727.500 2570.000 2986.000 107.867 2964.500
coldlaunch.visuallyLoaded 2763.500 2740.500 2578.000 2998.000 108.195 2975.500
coldlaunch.[ConversationService] 12, conversation retrieved 2889.500 2872.500 2638.000 3081.000 115.352 3067.000
coldlaunch.contentInteractive 3138.500 3103.500 2939.000 3369.000 105.983 3342.000
coldlaunch.objectsInitEnd 3169.300 3136.000 2974.000 3398.000 104.875 3371.000
coldlaunch.[ConversationClient] 10, conversation retrieved 3174.250 3140.500 2978.000 3402.000 104.817 3375.500
coldlaunch.[ConversationService] 13, conversation retrieved 3206.650 3171.000 2996.000 3421.000 103.026 3394.500
coldlaunch.[ConversationClient] 11, conversation retrieved 3299.600 3262.000 3125.000 3522.000 98.713 3491.500
coldlaunch.[ConversationService] 14, conversation retrieved 3326.600 3285.000 3155.000 3542.000 98.870 3509.500
coldlaunch.[ConversationClient] 12, conversation retrieved 3392.500 3376.000 3226.000 3607.000 98.218 3574.000
coldlaunch.[ConversationService] 15, conversation retrieved 3417.100 3399.000 3244.000 3626.000 101.166 3594.000
coldlaunch.[ConversationClient] 13, conversation retrieved 3540.150 3510.500 3372.000 3756.000 96.832 3723.500
coldlaunch.[ConversationService] 16, conversation retrieved 3561.100 3531.500 3395.000 3782.000 96.612 3747.500
coldlaunch.[ConversationClient] 14, conversation retrieved 3610.200 3573.000 3460.000 3836.000 96.412 3796.500
coldlaunch.[ConversationService] 17, conversation retrieved 3638.300 3610.000 3476.000 3855.000 94.927 3823.000
coldlaunch.[ConversationClient] 15, conversation retrieved 3689.800 3664.500 3528.000 3913.000 95.288 3877.500
coldlaunch.[ConversationService] 18, conversation retrieved 3716.900 3685.500 3554.000 3934.000 95.147 3904.000
coldlaunch.[ConversationClient] 16, conversation retrieved 3771.300 3743.500 3607.000 3988.000 94.100 3956.000
coldlaunch.[ConversationService] 19, conversation retrieved 3789.550 3760.000 3628.000 4008.000 94.672 3976.500
coldlaunch.[ConversationClient] 17, conversation retrieved 3841.450 3811.000 3679.000 4054.000 92.293 4024.500
coldlaunch.[ConversationService] 20, conversation retrieved 3860.450 3827.500 3695.000 4068.000 91.919 4039.500
coldlaunch.[ConversationClient] 18, conversation retrieved 3911.700 3877.500 3761.000 4119.000 91.025 4095.000
coldlaunch.[ConversationService] 21, conversation retrieved 3930.500 3890.500 3774.000 4134.000 90.727 4108.000
coldlaunch.[ConversationClient] 19, conversation retrieved 3984.850 3947.500 3874.000 4187.000 88.191 4163.000
coldlaunch.[ConversationService] 22, conversation retrieved 4006.950 3971.500 3887.000 4213.000 88.805 4183.500
coldlaunch.[ConversationClient] 20, conversation retrieved 4078.400 4055.000 3961.000 4269.000 89.150 4256.500
coldlaunch.[ConversationService] 23, conversation retrieved 4102.900 4076.000 3989.000 4301.000 89.590 4281.000
coldlaunch.[ConversationClient] 21, conversation retrieved 4155.500 4124.500 4046.000 4351.000 90.005 4336.500
coldlaunch.[ConversationService] 24, conversation retrieved 4179.350 4168.000 4065.000 4377.000 88.253 4355.000
coldlaunch.[ConversationClient] 22, conversation retrieved 4231.650 4213.000 4106.000 4429.000 89.285 4408.000
coldlaunch.[ConversationService] 25, conversation retrieved 4253.500 4248.500 4151.000 4447.000 85.561 4426.000
coldlaunch.[ConversationClient] 23, conversation retrieved 4311.050 4299.000 4193.000 4503.000 84.484 4481.500
coldlaunch.[ConversationService] 26, conversation retrieved 4329.000 4312.000 4241.000 4520.000 83.502 4500.000
coldlaunch.[ConversationClient] 24, conversation retrieved 4375.400 4354.000 4264.000 4566.000 85.800 4547.000
coldlaunch.[ConversationService] 27, conversation retrieved 4390.900 4374.500 4281.000 4581.000 86.269 4563.500
coldlaunch.[ConversationClient] 25, conversation retrieved 4441.850 4421.500 4323.000 4632.000 85.870 4611.000
coldlaunch.[ConversationService] 28, conversation retrieved 4464.900 4449.500 4354.000 4659.000 87.640 4641.000
coldlaunch.[ConversationClient] 26, conversation retrieved 4516.700 4493.500 4360.000 4714.000 89.465 4690.500
coldlaunch.[ConversationService] 29, conversation retrieved 4537.800 4517.500 4426.000 4729.000 85.899 4710.000
coldlaunch.[ConversationClient] 27, conversation retrieved 4585.450 4567.500 4431.000 4780.000 90.342 4758.000
coldlaunch.[ConversationService] 30, conversation retrieved 4603.550 4587.000 4462.000 4805.000 89.337 4779.000
coldlaunch.[ConversationClient] 28, conversation retrieved 4659.850 4634.500 4516.000 4857.000 87.730 4831.000
coldlaunch.[ConversationService] 31, conversation retrieved 4681.400 4657.000 4538.000 4880.000 86.686 4851.000
coldlaunch.[ConversationClient] 29, conversation retrieved 4733.300 4724.000 4595.000 4930.000 86.987 4900.000
coldlaunch.[ConversationService] 32, conversation retrieved 4755.350 4745.500 4618.000 4950.000 86.085 4918.500
coldlaunch.[ConversationClient] 30, conversation retrieved 4803.850 4789.500 4664.000 4998.000 87.523 4966.500
coldlaunch.[ConversationService] 33, conversation retrieved 4826.400 4814.500 4686.000 5008.000 88.051 4986.000
coldlaunch.[ConversationClient] 31, conversation retrieved 4878.600 4861.500 4752.000 5073.000 88.779 5048.500
coldlaunch.[ConversationService] 34, conversation retrieved 4896.200 4881.500 4759.000 5082.000 89.312 5059.000
coldlaunch.[ConversationClient] 32, conversation retrieved 4950.300 4934.000 4807.000 5173.000 93.616 5136.000
coldlaunch.[ConversationService] 35, conversation retrieved 4968.750 4949.500 4814.000 5180.000 95.921 5149.500
coldlaunch.[ConversationClient] 33, conversation retrieved 5017.400 4997.000 4870.000 5239.000 97.552 5206.500
coldlaunch.[ConversationService] 36, conversation retrieved 5036.450 5015.000 4885.000 5251.000 98.848 5219.500
coldlaunch.[ConversationClient] 34, conversation retrieved 5089.300 5065.000 4943.000 5301.000 98.519 5277.000
coldlaunch.[ConversationService] 37, conversation retrieved 5109.100 5085.000 4954.000 5311.000 97.021 5291.000
coldlaunch.[ConversationClient] 35, conversation retrieved 5165.250 5136.000 4999.000 5367.000 97.704 5347.000
coldlaunch.[ConversationService] All conversations retrieved 5187.250 5170.500 5014.000 5437.000 100.694 5386.500
coldlaunch.[ConversationClient] 36, conversation retrieved 5239.350 5207.500 5107.000 5461.000 94.393 5425.500
coldlaunch.[ConversationClient] 37, conversation retrieved 5303.300 5266.000 5174.000 5532.000 99.039 5499.500
coldlaunch.[ConversationClient] all conversations retrieved 5368.150 5337.000 5248.000 5596.000 97.679 5561.500
coldlaunch.fullyLoaded 5380.450 5351.000 5258.000 5611.000 98.006 5577.000
coldlaunch.uss 19.240 19.200 19.100 19.700 0.136 19.550
coldlaunch.rss 39.625 39.600 39.500 40.000 0.118 39.900
coldlaunch.pss 23.720 23.700 23.500 24.100 0.129 24.000

@azasypkin
Copy link
Contributor Author

8th approach: ConversationClient ---LocalBroadcastChannel---> ConversationService (window) ---LocalBroadcastChannel---> MobileMessageShim (window)

So the most workaround-y approach here, all services are in the same window, no iframes, no BroadcastChannel, no MessageChannels. Speed is only influenced by my first-crappy LocalBroadcastChannel custom endpoint implementation and bridge.

We've got +300ms boost comparing to best case above. The main problems here are:

  • Again this strange 100ms delay between connection and first method call (see diff between "[ConversationService] client connected" and "[ConversationService] start retrieving conversations").
  • Main thread is quite busy to pass retrieved message to the view (via 2 services). The last experiment will be with "setTimeout" around cursor.continue.
Metric Mean Median Min Max StdDev p95
coldlaunch.navigationLoaded 1263.750 1266.000 1160.000 1354.000 50.292 1342.000
coldlaunch.willRenderThreads 1303.400 1304.500 1199.000 1390.000 49.563 1381.000
coldlaunch.[ConversationClient] start retrieving conversations 1304.000 1304.500 1200.000 1390.000 49.474 1381.500
coldlaunch.navigationInteractive 1306.850 1307.500 1203.000 1393.000 49.459 1384.000
coldlaunch.[ConversationService] client connected 1309.450 1309.500 1206.000 1395.000 49.027 1386.500
coldlaunch.[ConversationService] start retrieving conversations 1401.300 1397.000 1309.000 1504.000 61.187 1495.500
coldlaunch.[MozMobileMessageShim] client connected 1411.500 1406.500 1319.000 1513.000 60.985 1505.000
coldlaunch.[MozMobileMessageShim] start retrieving conversations 1420.600 1416.000 1328.000 1522.000 60.815 1514.000
coldlaunch.[MozMobileMessageShim] 1, conversation retrieved 1509.350 1509.500 1418.000 1614.000 60.207 1606.000
coldlaunch.[ConversationService] 1, conversation retrieved 1521.650 1521.500 1427.000 1624.000 59.842 1619.000
coldlaunch.[MozMobileMessageShim] 2, conversation retrieved 1565.750 1563.500 1469.000 1691.000 65.836 1671.500
coldlaunch.[MozMobileMessageShim] 3, conversation retrieved 1569.200 1568.500 1477.000 1693.000 65.215 1675.500
coldlaunch.[MozMobileMessageShim] 4, conversation retrieved 1572.400 1572.000 1479.000 1696.000 65.690 1678.500
coldlaunch.[MozMobileMessageShim] 5, conversation retrieved 1576.650 1575.500 1482.000 1700.000 65.743 1683.000
coldlaunch.[MozMobileMessageShim] 6, conversation retrieved 1581.200 1579.500 1486.000 1710.000 66.447 1691.000
coldlaunch.[MozMobileMessageShim] 7, conversation retrieved 1583.250 1581.500 1488.000 1712.000 66.308 1693.000
coldlaunch.[MozMobileMessageShim] 8, conversation retrieved 1585.350 1583.500 1489.000 1715.000 66.407 1695.500
coldlaunch.[MozMobileMessageShim] 9, conversation retrieved 1589.600 1587.000 1492.000 1719.000 66.942 1702.000
coldlaunch.[MozMobileMessageShim] 10, conversation retrieved 1592.250 1590.000 1494.000 1722.000 66.797 1704.500
coldlaunch.[ConversationService] 2, conversation retrieved 1598.000 1593.500 1501.000 1731.000 67.631 1712.000
coldlaunch.[ConversationService] 3, conversation retrieved 1601.550 1598.000 1503.000 1734.000 67.356 1714.500
coldlaunch.[ConversationService] 4, conversation retrieved 1603.950 1600.500 1505.000 1736.000 67.465 1716.500
coldlaunch.[ConversationService] 5, conversation retrieved 1607.550 1604.500 1508.000 1743.000 67.780 1721.500
coldlaunch.[ConversationService] 6, conversation retrieved 1609.550 1606.500 1509.000 1744.000 67.807 1723.000
coldlaunch.[ConversationService] 7, conversation retrieved 1611.450 1608.000 1511.000 1745.000 67.919 1724.500
coldlaunch.[ConversationService] 8, conversation retrieved 1613.300 1610.000 1512.000 1746.000 67.857 1726.000
coldlaunch.[ConversationService] 9, conversation retrieved 1615.700 1612.000 1514.000 1748.000 67.933 1728.500
coldlaunch.[ConversationService] 10, conversation retrieved 1617.600 1614.000 1516.000 1750.000 67.913 1730.500
coldlaunch.[MozMobileMessageShim] 11, conversation retrieved 1778.950 1698.000 1542.000 2306.000 240.087 2279.000
coldlaunch.[MozMobileMessageShim] 12, conversation retrieved 1785.950 1704.000 1555.000 2315.000 239.211 2284.500
coldlaunch.[MozMobileMessageShim] 13, conversation retrieved 1788.450 1706.000 1557.000 2322.000 240.023 2289.500
coldlaunch.[MozMobileMessageShim] 14, conversation retrieved 1791.050 1708.000 1559.000 2324.000 239.679 2291.500
coldlaunch.[MozMobileMessageShim] 15, conversation retrieved 1818.550 1710.000 1561.000 2726.000 302.182 2526.000
coldlaunch.[MozMobileMessageShim] 16, conversation retrieved 1821.300 1712.500 1564.000 2729.000 301.994 2528.500
coldlaunch.[MozMobileMessageShim] 17, conversation retrieved 1851.900 1715.000 1570.000 2887.000 366.173 2809.000
coldlaunch.[MozMobileMessageShim] 18, conversation retrieved 1882.600 1717.000 1571.000 2890.000 385.763 2811.500
coldlaunch.[MozMobileMessageShim] 19, conversation retrieved 1884.900 1718.500 1574.000 2893.000 385.910 2814.500
coldlaunch.[ConversationService] 11, conversation retrieved 1808.300 1723.500 1578.000 2332.000 237.307 2305.500
coldlaunch.[ConversationService] 12, conversation retrieved 1810.350 1725.000 1583.000 2335.000 237.217 2307.500
coldlaunch.[ConversationService] 13, conversation retrieved 1812.350 1727.000 1585.000 2337.000 237.116 2310.000
coldlaunch.[ConversationService] 14, conversation retrieved 1814.150 1728.500 1587.000 2339.000 236.938 2311.500
coldlaunch.[ConversationService] 15, conversation retrieved 1842.350 1730.500 1589.000 2755.000 301.572 2548.000
coldlaunch.[ConversationService] 16, conversation retrieved 1844.350 1732.000 1591.000 2761.000 302.116 2552.000
coldlaunch.[ConversationService] 17, conversation retrieved 1874.500 1734.000 1593.000 2913.000 367.370 2838.000
coldlaunch.[ConversationService] 18, conversation retrieved 1904.950 1735.500 1595.000 2920.000 387.203 2842.500
coldlaunch.[ConversationService] 19, conversation retrieved 1906.650 1737.500 1597.000 2922.000 387.263 2844.500
coldlaunch.[ConversationService] drafts index loaded 1760.550 1760.000 1599.000 1931.000 98.282 1926.000
coldlaunch.[ConversationClient] 1, conversation retrieved 1782.150 1780.500 1620.000 1958.000 99.112 1951.000
coldlaunch.[ConversationClient] 2, conversation retrieved 1880.850 1880.000 1712.000 2052.000 101.416 2048.500
coldlaunch.[ConversationClient] 3, conversation retrieved 1895.150 1893.000 1724.000 2065.000 101.034 2061.500
coldlaunch.[ConversationClient] 4, conversation retrieved 1908.600 1904.500 1735.000 2076.000 100.637 2073.000
coldlaunch.[ConversationClient] 5, conversation retrieved 1921.500 1916.500 1746.000 2087.000 100.311 2084.500
coldlaunch.[ConversationClient] 6, conversation retrieved 1933.000 1928.000 1756.000 2096.000 100.156 2094.000
coldlaunch.[ConversationClient] 7, conversation retrieved 1949.700 1945.500 1772.000 2109.000 99.206 2108.000
coldlaunch.[ConversationClient] 8, conversation retrieved 1960.900 1955.000 1785.000 2118.000 98.773 2117.000
coldlaunch.[ConversationClient] 9, conversation retrieved 1971.900 1966.500 1795.000 2128.000 98.783 2127.500
coldlaunch.visuallyLoaded 1982.900 1979.500 1806.000 2136.000 97.315 2135.500
coldlaunch.[ConversationClient] 10, conversation retrieved 2058.500 2060.000 1899.000 2197.000 88.325 2195.000
coldlaunch.[ConversationClient] 11, conversation retrieved 2110.250 2125.500 1919.000 2354.000 120.762 2328.000
coldlaunch.[ConversationClient] 12, conversation retrieved 2133.600 2147.500 1941.000 2377.000 119.429 2349.500
coldlaunch.[ConversationClient] 13, conversation retrieved 2143.800 2157.000 1950.000 2387.000 119.022 2359.500
coldlaunch.[ConversationClient] 14, conversation retrieved 2153.200 2166.000 1960.000 2397.000 118.981 2369.000
coldlaunch.[ConversationClient] 15, conversation retrieved 2192.500 2179.500 1974.000 2788.000 178.446 2597.000
coldlaunch.[ConversationClient] 16, conversation retrieved 2202.450 2188.500 1984.000 2804.000 179.619 2609.500
coldlaunch.[ConversationClient] 17, conversation retrieved 2238.950 2197.500 1994.000 2951.000 238.930 2885.500
coldlaunch.[ConversationClient] 18, conversation retrieved 2259.400 2207.500 2010.000 2968.000 243.909 2899.500
coldlaunch.[ConversationClient] 19, conversation retrieved 2269.550 2219.000 2019.000 2981.000 244.676 2911.500
coldlaunch.contentInteractive 2825.750 2831.000 2572.000 2997.000 121.912 2991.500
coldlaunch.objectsInitEnd 2860.300 2868.000 2602.000 3030.000 123.571 3028.000
coldlaunch.[MozMobileMessageShim] 20, conversation retrieved 2533.350 2483.500 2291.000 2958.000 195.976 2927.000
coldlaunch.[MozMobileMessageShim] 21, conversation retrieved 2537.000 2486.000 2296.000 2960.000 195.650 2929.500
coldlaunch.[MozMobileMessageShim] 22, conversation retrieved 2540.200 2492.000 2299.000 2964.000 195.469 2932.500
coldlaunch.[MozMobileMessageShim] 23, conversation retrieved 2542.250 2494.500 2301.000 2967.000 195.732 2935.500
coldlaunch.[MozMobileMessageShim] 24, conversation retrieved 2597.850 2522.000 2303.000 3111.000 253.106 3107.500
coldlaunch.[MozMobileMessageShim] 25, conversation retrieved 2600.300 2524.000 2311.000 3113.000 252.964 3110.000
coldlaunch.[MozMobileMessageShim] 26, conversation retrieved 2619.000 2526.000 2312.000 3238.000 281.482 3177.000
coldlaunch.[MozMobileMessageShim] 27, conversation retrieved 2621.400 2528.000 2319.000 3241.000 281.802 3181.000
coldlaunch.[MozMobileMessageShim] 28, conversation retrieved 2623.900 2529.500 2321.000 3250.000 283.063 3188.500
coldlaunch.[ConversationService] 20, conversation retrieved 2559.250 2508.000 2325.000 2985.000 196.047 2954.500
coldlaunch.[ConversationService] 21, conversation retrieved 2562.150 2510.000 2328.000 2991.000 197.099 2958.500
coldlaunch.[ConversationService] 22, conversation retrieved 2564.000 2511.500 2330.000 2993.000 197.215 2961.000
coldlaunch.[ConversationService] 23, conversation retrieved 2565.550 2513.500 2332.000 2995.000 197.248 2963.000
coldlaunch.[ConversationService] 24, conversation retrieved 2621.750 2538.500 2336.000 3141.000 255.100 3136.000
coldlaunch.[ConversationService] 25, conversation retrieved 2624.200 2540.000 2338.000 3146.000 255.634 3141.000
coldlaunch.[ConversationService] 26, conversation retrieved 2644.150 2541.500 2339.000 3300.000 288.066 3224.000
coldlaunch.[ConversationService] 27, conversation retrieved 2645.600 2543.000 2341.000 3303.000 288.174 3226.000
coldlaunch.[ConversationService] 28, conversation retrieved 2647.250 2544.000 2342.000 3306.000 288.318 3228.500
coldlaunch.[ConversationClient] 20, conversation retrieved 2593.100 2544.500 2349.000 3022.000 205.540 3008.500
coldlaunch.[ConversationClient] 21, conversation retrieved 2605.550 2555.500 2358.000 3047.000 208.113 3025.500
coldlaunch.[ConversationClient] 22, conversation retrieved 2619.200 2570.000 2372.000 3063.000 207.871 3039.500
coldlaunch.[ConversationClient] 23, conversation retrieved 2631.650 2582.000 2381.000 3075.000 206.430 3050.500
coldlaunch.[ConversationClient] 24, conversation retrieved 2689.500 2592.500 2390.000 3172.000 254.431 3167.000
coldlaunch.[ConversationClient] 25, conversation retrieved 2703.950 2609.000 2403.000 3193.000 254.347 3186.500
coldlaunch.[ConversationClient] 26, conversation retrieved 2745.550 2648.500 2443.000 3333.000 273.688 3275.500
coldlaunch.[ConversationClient] 27, conversation retrieved 2760.150 2666.000 2461.000 3350.000 274.019 3294.000
coldlaunch.[ConversationClient] 28, conversation retrieved 2773.300 2682.500 2476.000 3365.000 273.533 3309.000
coldlaunch.[MozMobileMessageShim] 29, conversation retrieved 3234.400 3239.500 3115.000 3389.000 79.550 3353.000
coldlaunch.[MozMobileMessageShim] 30, conversation retrieved 3238.200 3241.500 3121.000 3392.000 78.909 3356.500
coldlaunch.[MozMobileMessageShim] 31, conversation retrieved 3244.000 3247.000 3123.000 3394.000 77.358 3359.000
coldlaunch.[MozMobileMessageShim] 32, conversation retrieved 3248.700 3266.500 3126.000 3396.000 78.498 3361.500
coldlaunch.[MozMobileMessageShim] 33, conversation retrieved 3294.050 3299.500 3128.000 3619.000 114.540 3565.500
coldlaunch.[MozMobileMessageShim] 34, conversation retrieved 3296.500 3301.500 3130.000 3626.000 115.364 3570.500
coldlaunch.[MozMobileMessageShim] 35, conversation retrieved 3322.100 3311.000 3134.000 3741.000 149.866 3684.500
coldlaunch.[MozMobileMessageShim] 36, conversation retrieved 3324.650 3313.000 3136.000 3749.000 150.814 3689.500
coldlaunch.[MozMobileMessageShim] 37, conversation retrieved 3326.850 3315.000 3138.000 3750.000 150.757 3691.000
coldlaunch.[ConversationService] 29, conversation retrieved 3264.600 3283.000 3141.000 3405.000 78.256 3374.000
coldlaunch.[ConversationService] 30, conversation retrieved 3268.650 3285.000 3144.000 3407.000 78.293 3378.000
coldlaunch.[ConversationService] 31, conversation retrieved 3270.750 3288.000 3146.000 3409.000 78.212 3380.000
coldlaunch.[ConversationService] 32, conversation retrieved 3272.600 3291.000 3147.000 3410.000 78.062 3381.000
coldlaunch.[ConversationService] 33, conversation retrieved 3317.250 3321.000 3153.000 3637.000 112.742 3585.000
coldlaunch.[ConversationService] 34, conversation retrieved 3319.500 3325.500 3155.000 3638.000 112.415 3586.000
coldlaunch.[ConversationService] 35, conversation retrieved 3343.100 3334.500 3157.000 3755.000 146.925 3697.500
coldlaunch.[ConversationService] 36, conversation retrieved 3345.100 3335.500 3158.000 3758.000 147.748 3701.500
coldlaunch.[ConversationService] 37, conversation retrieved 3346.550 3337.000 3159.000 3759.000 147.626 3702.500
coldlaunch.[ConversationClient] 29, conversation retrieved 3307.700 3317.500 3174.000 3460.000 73.767 3419.000
coldlaunch.[ConversationClient] 30, conversation retrieved 3328.200 3344.000 3196.000 3482.000 75.173 3445.500
coldlaunch.[ConversationClient] 31, conversation retrieved 3345.800 3359.000 3211.000 3497.000 72.736 3464.000
coldlaunch.[ConversationClient] 32, conversation retrieved 3358.750 3372.500 3223.000 3510.000 72.776 3478.000
coldlaunch.[ConversationClient] 33, conversation retrieved 3397.800 3406.000 3235.000 3654.000 99.770 3602.500
coldlaunch.[ConversationClient] 34, conversation retrieved 3407.850 3415.000 3245.000 3668.000 100.499 3615.000
coldlaunch.[ConversationClient] 35, conversation retrieved 3439.700 3430.500 3260.000 3763.000 124.731 3723.000
coldlaunch.[ConversationClient] 36, conversation retrieved 3450.000 3439.000 3269.000 3777.000 126.173 3737.000
coldlaunch.[ConversationClient] 37, conversation retrieved 3461.450 3449.000 3279.000 3794.000 127.983 3751.000
coldlaunch.[MozMobileMessageShim] all conversations retrieved 3740.250 3734.500 3546.000 3987.000 120.850 3962.500
coldlaunch.[ConversationService] All conversations retrieved 3746.200 3743.500 3549.000 3991.000 121.573 3969.000
coldlaunch.[ConversationClient] all conversations retrieved 3750.750 3747.500 3552.000 4000.000 121.855 3974.500
coldlaunch.fullyLoaded 3764.600 3758.500 3563.000 4013.000 121.697 3988.000
coldlaunch.pss 25.620 26.100 23.700 26.200 0.774 26.200
coldlaunch.uss 21.040 21.500 19.200 21.700 0.774 21.650
coldlaunch.rss 41.385 41.800 39.500 42.000 0.796 42.000

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

@julienw
Copy link
Contributor

julienw commented Aug 20, 2015

I know I'm repeating myself :) did you try to profile using WebIDE ? This may help finding where this 100ms delay comes from.

Now as an answer to #31051 (comment), it's definitely weird. Only thing I can think is that we have events competing with microtasks (or maybe internal gecko messages?) -- events would have less priority. Again, only profiling could help, in my opinion.

@azasypkin
Copy link
Contributor Author

I know I'm repeating myself :) did you try to profile using WebIDE ? This may help finding where this 100ms delay comes from.

Not yet, but going to try today! Finished with raptor, now will get used to WebIDE profiler :)

@mozilla-autolander-deprecated
Copy link
Contributor

@mozilla-autolander-deprecated
Copy link
Contributor

@azasypkin azasypkin closed this Aug 25, 2015
@azasypkin azasypkin reopened this Aug 25, 2015
@mozilla-autolander-deprecated
Copy link
Contributor

…or streaming joined threads and drafts list. r=julien, schung
@mozilla-autolander-deprecated
Copy link
Contributor

rvandermeulen added a commit that referenced this pull request Aug 27, 2015
…vice-get-threads

Bug 1169576 - [Messages][NG] Implement Conversation service: method for streaming joined threads and drafts list. r=julien
@rvandermeulen rvandermeulen merged commit 664bed4 into mozilla-b2g:master Aug 27, 2015
azasypkin added a commit that referenced this pull request Aug 31, 2015
…ion-service-get-threads

Revert "Merge pull request #31051 from azasypkin/bug-1169576-conversation-service-get-threads"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants