mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Disable deprecations unless in dev/spec mode
These are currently adding ~200ms to startup so temporarily disable until the grim performance is improved and/or core and bundled packages are updated to not call deprecated APIs.
This commit is contained in:
@@ -158,6 +158,12 @@ class Atom extends Model
|
||||
#
|
||||
# Call after this instance has been assigned to the `atom` global.
|
||||
initialize: ->
|
||||
# Disable deprecations unless in dev mode or spec mode so that regular
|
||||
# editor performance isn't impacted by generating stack traces for
|
||||
# deprecated calls.
|
||||
unless @inDevMode() or @inSpecMode()
|
||||
require('grim').deprecate = ->
|
||||
|
||||
window.onerror = =>
|
||||
@openDevTools()
|
||||
@executeJavaScriptInDevTools('InspectorFrontendAPI.showConsole()')
|
||||
|
||||
Reference in New Issue
Block a user