I have written an automated web scraping process which navigates to a series of 5 pages and scrapes the required information.
I tried running the script using SlimerJS to make the debugging easy. The execution time of the entire process was less than 15 seconds. I tried multiple times with same results.
Then I tried running it with PhantomJS. Surprisingly, the execution time increased significantly. It was over 35 seconds every time.
I was hoping PhantomJS to be much faster since there is no opening of any GUI. How can I debug why its taking much longer in PhantomJS?
If I am not able to make it faster in PhantomJS, is it advisable to use SlimerJS in production server with headless setup ?
Running these scripts on Ubuntu 14.04