Node-webkit app with a lots of files takes long to start

Issues related to Enigma Virtual Box
Post Reply
bulatsh
Posts: 2
Joined: Tue Oct 29, 2013 6:52 pm

Node-webkit app with a lots of files takes long to start

Post by bulatsh » Tue Oct 29, 2013 7:03 pm

Hi, Enigma!

I've made an app using node-webkit, ie node-webkit.exe plus lots of .html and .js files, totally around 250mb. I've succeeded packing it with EVB and it works perfectly fine. The only issue I have now is load time. It takes 20 secs to show app window and another 30 secs to show it's content, which comes from .html file packed along with my .exe.

I've also tried packing my data files in a separate package, ie app files in a resulting_app.exe and data files in mydata.dat file. That didn't help either. What I want to achieve is to start app as quickly as possible and show index.html, the rest of the html files can be loaded later on demand.

Is there any way to make boostrap time shorter? Thanks.

Enigma
Site Admin
Posts: 2543
Joined: Wed Aug 20, 2008 2:24 pm

Re: Node-webkit app with a lots of files takes long to start

Post by Enigma » Wed Nov 06, 2013 5:49 am

Hi bulatsh,

Unfortunately, before the execution will come to the main code, the EVB has to initialize the virtual system (for eg, read from file and remember description of all virtual files). If there are a lot of virtual files then it will take some time to run. Almost nothing can be done there.

But using Enigma Protector and it's Virtual Box feature you may add a Splash Screen that, at least, will notify user that application is being executing and it is not freezed.

popcade
Posts: 9
Joined: Sun Nov 10, 2013 12:44 pm

Re: Node-webkit app with a lots of files takes long to start

Post by popcade » Sun Nov 10, 2013 1:05 pm

Hi,

I have same exerience, I VirtualBoxed MinGW compiler directory, when compiling, the speed become slower
(from 0.5 sec to 6 sec), that might be some bottleneck with file searching.

In most case, I don't feel the speed slow down on most programs.

bulatsh
Posts: 2
Joined: Tue Oct 29, 2013 6:52 pm

Re: Node-webkit app with a lots of files takes long to start

Post by bulatsh » Tue Nov 12, 2013 12:43 pm

Hello, again!

Thank you so much for your answer.
Sorry for taking too long to reply. Well, I had to rework my app. Now it manages all html and js files itself, keeping them in a kind of a db file. Which allowed me to start my app immediately (show window and first page) and load other files on demand.

Thanks.

dany90
Posts: 1
Joined: Wed Jan 15, 2014 9:16 am

Re: Node-webkit app with a lots of files takes long to start

Post by dany90 » Wed Jan 15, 2014 10:03 am

bulatsh, How did you make the db file load on demand? Is it a EVB feature? Can it still be compressed? So far I've only been able to add dat files that are added onto the exe at startup. I saw no improvement, so I just left most files outside the exe (regular file system).

Post Reply