imported patch measure-startup-time draft
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 25 Jul 2019 12:46:55 +1200
changeset 76424 e16ebf0a60e6fb1820e555ce31a14ff513f2369a
parent 76423 e2dad5423b3ba2aa4742d4f0e74e0a06ebe92291
child 76425 613e724c44ecfad062788862e803875edfef4d03
push id8886
push usergeoff@darktrojan.net
push dateThu, 25 Jul 2019 00:48:52 +0000
treeherdertry-comm-central@a54ce8505f71 [default view] [failures only]
imported patch measure-startup-time
calendar/base/content/calendar-chrome-startup.js
calendar/providers/composite/calCompositeCalendar.js
mail/components/mailGlue.js
--- a/calendar/base/content/calendar-chrome-startup.js
+++ b/calendar/base/content/calendar-chrome-startup.js
@@ -72,16 +72,18 @@ async function commonInitCalendar() {
      * calendar support refreshes (i.e. the "onLoad" notification) or when none
      * are active. In specific cases such as for file-based ICS calendars can
      * happen, the initial "onLoad" will already have been triggered at this
      * point (see bug 714431 comment 29). We thus inconditionnally invoke
      * calendarUpdateNewItemsCommand until somebody writes code that enables the
      * checking of the calendar readiness (getProperty("ready") ?).
      */
     calendarUpdateNewItemsCommand();
+
+    dump("FINISH: " + Date.now() + "\n");
 }
 
 /**
  * Common unload steps for calendar chrome windows.
  */
 function commonFinishCalendar() {
     // Unload the calendar manager
     unloadCalendarManager();
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -382,16 +382,17 @@ calCompositeCalendar.prototype = {
             return null;
         }
         if (this.mStatusObserver) {
             if (this.mStatusObserver.spinning == Ci.calIStatusObserver.NO_PROGRESS) {
                 this.mStatusObserver.startMeteors(Ci.calIStatusObserver.UNDETERMINED_PROGRESS, -1);
             }
         }
         let cmpListener = new calCompositeGetListenerHelper(this, aListener, aCount);
+        dump(`COMPOSITE START: ${Date.now()}\n`)
 
         for (let calendar of enabledCalendars) {
             try {
                 cmpListener.opGroup.add(calendar.getItems(aItemFilter,
                                                           aCount,
                                                           aRangeStart,
                                                           aRangeEnd,
                                                           cmpListener));
@@ -492,16 +493,17 @@ calCompositeGetListenerHelper.prototype 
             // we're done here.
             this.mFinished = true;
             this.opGroup.notifyCompleted();
             this.mRealListener.onOperationComplete(this,
                                                    aStatus,
                                                    calIOperationListener.GET,
                                                    null,
                                                    null);
+            dump(`COMPOSITE END: ${Date.now()}\n`)
         }
     },
 
     onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
         if (!this.mRealListener) {
             // has been cancelled, ignore any providers firing on this...
             return;
         }
--- a/mail/components/mailGlue.js
+++ b/mail/components/mailGlue.js
@@ -40,16 +40,17 @@ let ACTORS = {
 function MailGlue() {
   XPCOMUtils.defineLazyGetter(this, "_sanitizer",
     function() {
       let sanitizerScope = {};
       Services.scriptloader.loadSubScript("chrome://messenger/content/sanitize.js", sanitizerScope);
       return sanitizerScope.Sanitizer;
     });
 
+  dump("START: " + Date.now() + "\n");
   this._init();
 }
 
 MailGlue.prototype = {
   // init (called at app startup)
   _init() {
     Services.obs.addObserver(this, "xpcom-shutdown");
     Services.obs.addObserver(this, "final-ui-startup");