Remove load and activate methods from ThemePackage

I assume these were added to speed theme loading, but now that promises
are being used it complicates overriding methods. From my tests removing
these methods and relying on Atom Package's methods added ~2 ms per 
theme.
This commit is contained in:
probablycorey
2014-02-07 11:18:44 -08:00
parent 7686b348b1
commit 0f68f095f1

View File

@@ -1,3 +1,4 @@
Q = require 'q'
AtomPackage = require './atom-package'
Package = require './package'
@@ -15,16 +16,3 @@ class ThemePackage extends AtomPackage
disable: ->
atom.config.removeAtKeyPath('core.themes', @metadata.name)
load: ->
@measure 'loadTime', =>
try
@metadata ?= Package.loadMetadata(@path)
catch e
console.warn "Failed to load theme named '#{@name}'", e.stack ? e
this
activate: ->
@measure 'activateTime', =>
@loadStylesheets()
@activateNow()