I'm sorry if this question doesn't belong here. Has anyone some performance-wise data or comparison between these? Apps in node-webkit are significantly faster or allowed to use more system resources than the same app running in the browser?
2 Answers
Chrome uses the V8 engine to speed up JavaScript execution, so does node-webkit (via node.js). Chrome has support for background workers and hardware accelerated graphics, so does node-webkit.
Node-webkit will have similar performance to Chrome because node-webkit is a chromium browser and largely uses similar technology.
Exceptions
There are exceptions to this generalization. Node-webkit doesn't use the exact same technology and there have been documented performance differences between node.js and Chrome but it seems that the general intention is to unify the implementation of these systems. In the future performance will likely converge even more. At the moment it seems that node-webkit can be faster in certain situations.
Other considerations
Since node-webkit is a client-side standalone product there are other important differences to web apps.
In Chrome your app and all its assets needs to be downloaded from the web. With node-webkit this happens during installation so unlike with web-apps, it's generally possible to use much larger and higher-quality assets for node-webkit apps. Case in point, our node-webkit powered game ships with 120MB of assets. Try loading that in a browser and your users will likely be frustrated by long progress bars.
A node-webkit app can also fine-tune itself for one specific version and you can even change browser-specific behavior just for your app without affecting anything else (in our game we increased the local storage limit of the browser itself to allow easier saving/loading of data).
Finally, node-webkit allows you to use features such as accessing the local file system, which are generally not allowed in a browser for security reasons. This also allows you to integrate your app with other applications. In our case we use a node-webkit plugin to integrate with Steam. None of this would be possible, if the app would run in Chrome.
Node-webkit isn't a good alternative for web-apps but it's a great tool to enable HTML5 powered client applications or games.
2 Comments
dom_storage_quota parameter in the package.json - see github.com/rogerwang/node-webkit/wiki/Manifest-formatIf I understand correctly you are asking if Nodejs or Chrome is faster? Command line tools like Node.js are always going to run faster and users are allowed to access more system resources. Due to security reasons Chrome or any web browser has limited access to the host Operating System. You can add scripts to node that can do things like access more of the system and do perform more tasks. Browsers are more or less limited when it comes to system access.