Perf: lazy-load more require() calls in main process
Went from 36 unique require calls, to 31 calls after this commit.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
const appConfig = require('application-config')('WebTorrent')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const electron = require('electron')
|
||||
const arch = require('arch')
|
||||
@@ -146,6 +145,8 @@ function isPortable () {
|
||||
return false
|
||||
}
|
||||
|
||||
const fs = require('fs')
|
||||
|
||||
try {
|
||||
// This line throws if the "Portable Settings" folder does not exist, and does
|
||||
// nothing otherwise.
|
||||
|
||||
Reference in New Issue
Block a user