4

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 2

4
+25

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Great info... how did you change the local storage limit? I don't know if we can do something similar to use more RAM per process or something like that(our app has big data structures and need a lot of memory).
We actually implemented this feature ourselves and made a pull-request to node-webkit. You can now configure the dom storage quota via the dom_storage_quota parameter in the package.json - see github.com/rogerwang/node-webkit/wiki/Manifest-format
1

If 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.

2 Comments

That's right. I'm porting an app to nodewebkit and it performs 80% faster by now, but I wanted to know if from nodewebkit the app has the same limitations in terms of allowed use of resources. For example, the app when is running from the browser started to behave slugish after a RAM threshold is reached.
Each approach has its pros and cons but you will definitely get better performance from a system like node that has greater access to the system. For example web apps are not allowed to do things like access the system cache or write temp files because again of security reasons. With node however that is not the case as long as the user had elevated privileges the system resources can be utilized.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.