[RFC] perf: use an internal module resolver to improve require performance (#14633)

* perf: use an internal module resolver instead of relative requires

* perf: memoize the results of getting exported Electron properties

* perf: make internal module changes consistent across sandboxed / bundled files
This commit is contained in:
Samuel Attard 2018-09-20 13:43:26 +10:00 committed by GitHub
parent 73d1b76b54
commit 54ef906832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 156 additions and 73 deletions

View file

@ -3,8 +3,8 @@
const { ipcRenderer, remote, webFrame } = require('electron')
const v8Util = process.atomBinding('v8_util')
const guestViewInternal = require('./guest-view-internal')
const webViewConstants = require('./web-view-constants')
const guestViewInternal = require('@electron/internal/renderer/web-view/guest-view-internal')
const webViewConstants = require('@electron/internal/renderer/web-view/web-view-constants')
// An unique ID that can represent current context.
const contextId = v8Util.getHiddenValue(global, 'contextId')