title: Slow loading of my Firefox extensions - for all ChromeWindow
body: <p>I have a created by myself Firefox Add-ons and they slowly turn on but the problem is generic.</p>
  
  <p>Check how slow loading:
  <a href="https://addons.mozilla.org/pl/firefox/addon/best-theme-like-google-materia/" rel="nofollow">https://addons.mozilla.org/pl/firefox/addon/best-theme-like-google-materia/</a></p>
  
  <p><code>for</code> loop for each of <code>browserWindows</code> array:</p>
  
  <pre><code>var { viewFor } = require("sdk/view/core");
  var windows = require("sdk/windows");
  
  var browserWindows = windows.browserWindows;
  for (let browserWindow of browserWindows) {
      let chromeWindow = viewFor(browserWindow);
      module.enable(chromeWindow);
  }
  </code></pre>
  
  <p>And then for the newly opened window:</p>
  
  <pre><code>browserWindows.on('open', function(browserWindow) {
      var chromeWindow = viewFor(browserWindow);
      module.enable(chromeWindow);
  });
  </code></pre>
  
  <p>And disable for each browser window - <code>for</code> loop on the same array:</p>
  
  <pre><code>var browserWindows = windows.browserWindows;
  for (let browserWindow of browserWindows) {
      let chromeWindow = viewFor(browserWindow);
      module.disable(chromeWindow);
  }
  </code></pre>
  
  <p>It seems to me that in these functions loaders for windows is a problem.
  Because he does the addition of such a thing that should not slime when turning, eg .:</p>
  
  <pre><code>var style = require("sdk/stylesheet/utils");
  var self = require("sdk/self");
  function enable (window) {
      style.loadSheet(window, self.data.url("toolbars/tabs.css"), "author");
      style.loadSheet(window, self.data.url("toolbars/navigator.css"), "author");
      style.loadSheet(window, self.data.url("toolbars/other-toolbars.css"), "author");
  }
  
   function disable (window) {
      style.removeSheet(window, self.data.url("toolbars/tabs.css"), "author");
      style.removeSheet(window, self.data.url("toolbars/navigator.css"), "author");
      style.removeSheet(window, self.data.url("toolbars/other-toolbars.css"), "author");
  }
  </code></pre>
  
  <p>How to do it more efficiently, not to the charge made muddy?</p>