facundoolano / aso

Tools for app store optimization on iTunes and Google Play
MIT License
720 stars 144 forks source link

No problem in iTunes but there is a problem for Google Play #6

Closed gcatak closed 7 years ago

gcatak commented 7 years ago

My Code:

const gplay = require('aso')('gplay');
const itunes = require('aso')('itunes');

console.log("play store: ");

// do stuff with google play
gplay.scores('panda').then(console.log);

console.log("iTunes: ")
// do stuff with itunes
itunes.scores('panda').then(console.log);

Output:

github

icaroponce commented 7 years ago

Just confirming that something's going wrong when it comes google-play-scraper dep module.

It takes so long to retrieve all apps from store to score, since it takes them with { fullDetail: true, num: 100} opts in the search method.

If you run your example with a DEBUG=google-play-scraper env variable, you can see all the requests being made on your terminal.

Running it here, it took over 2 minutes (once it took even 4 minutes to finish) all the times to finish the score to google-play.

If I find a solution, I'll let you guys know.

facundoolano commented 7 years ago

This is not something going wrong, just working as expected. Google doesn't provide a proper API for the app details, so everything has to be scraped, thus resulting in an extra request per app to get the details needed for score calculations. (I think I had a warning about this in the README at some point, I guess I removed it.)

Memoization helps to mitigate this for recurrent requests, but obviously the proper way to go to get fast calculations would be to scrape the data and store it in a DB, then consuming from there for the calculations, but that's out of the scope of this module.

icaroponce commented 7 years ago

Sorry, I wasn't clear on what I had written.

I know that, by a technical aspect, the code is working exactly as expected.

I'm just wondering if we could do something to dim the response time or at least point out in the doc some warning with more evidence for google play store, since 2 ~ 4 minutes is a long long time to wait, and comparing it with app store lib we can note a rather discrepant response time difference.

So, I think that the simple user is very unlikely to understand quickly the reason, because, he doesn't know the google-play-scraper detail implementation when starting to use this module, and if we can't change the way the method works, maybe update the docs to alert about this fact would be nice.

facundoolano commented 7 years ago

Agreed, this definitely calls for an explanation in the readme.

facundoolano commented 7 years ago

Added a note about Google Play performance in the readme