Implement Lazy BrowserWindow Initialization 36/193136/1
authorws29.jung <ws29.jung@samsung.com>
Thu, 15 Nov 2018 05:01:25 +0000 (14:01 +0900)
committerws29.jung <ws29.jung@samsung.com>
Thu, 15 Nov 2018 05:01:25 +0000 (14:01 +0900)
App launching using electron-efl was faster than xwalk and
used more memory because of webview creation under window init.
Now BrowserWindow will not initialized when wrt-loader preloads.
This decrease the memory consumption of wrt-loader and
app launching time is nearly the same as the xwalk.

Change-Id: I0c8a8b2dd86a0e445cd1f6ca75cab2c231cd66a9
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
wrt/src/runtime.js

index c4813c9df0bee631331da98930de912299f15c2f..f77d79a6a34f3202bd2374d63bbb7ca78bf4d0f5 100755 (executable)
@@ -66,7 +66,6 @@ class Runtime {
             if (wrt.isElectronLaunch()) {
                 return;
             }
-            _this.webApplication = new WebApplication(options);
         });
         wrt.on('start-app', function() {
             runtime_debug('start-app');
@@ -82,6 +81,7 @@ class Runtime {
                 Module._load(mainJsPath, Module, true);
                 app.emit('ready');
              } else {
+                _this.webApplication = new WebApplication(options);
                 _this.webApplication.focusedWebWindow.setUrl('');
                 if (wrt.appID !== 'NVPDzvckj9.RuntimeAddonSetting') {
                     _this.extensionManager.activateAll(app);