Closed devKshitijJain closed 4 years ago
Good to see fast response. (y)
I tested this PR. Works fast enough with headless: false
. But, with, headless: true
, it takes something around 100s to load a single page that contains SVG. It would be great help if you could do some magic regarding itthis. :D
This is an example page: https://www.educative.io/courses/grokking-computer-networking/3jQgm8xAnxA
Well that's something new. Pull Bot closed it. Gonna reopen it.
@the-redback well image has to be loaded and then it need to be read using fileReader to get data uri. I am not sure how I can improve it.
Right now, you are requesting one url at a time. We should send multiple concurrent requests to boost the speed a bit up. I am gonna merge this anyway but this should be done.
Well I am not sure about it. The thing is even if we put it in array of promise. If 2nd image loads faster than first, what will happen in that case?
@the-redback well image has to be loaded and then it need to be read using fileReader to get data uri. I am not sure how I can improve it.
Yes. And, it takes only 1/2 seconds to do all of this in headless: false
. But, headless: true
mode is so slow that each iterate takes 2/3 seconds, in total 100s. I wonder if it is possible to make it as faster as headless: false
.
My assumption is that when headless is false in that case, the image is already visible and in memory, thus it takes very little time.
Fixes - https://github.com/shihabmridha/educative.io-downloader/issues/28