kengru / Giru

A disrespectful spanish telegram bot.
MIT License
4 stars 2 forks source link

Profile and optimize /cartelera #16

Closed ronyb29 closed 6 years ago

ronyb29 commented 6 years ago

Most of the time is being spent opening and closing ssl connections.

There is no easy way to optimize since the IMDB client uses urllib and would have to be modified to support keep alive (requests, urllib3)

An option would be to make do the requests and parse the response himself.

image

Giru16.pstat.zip

ronyb29 commented 6 years ago

Writing a custom request parser improved a bit, but not enough. forgot to take the screenshot of stats before scraping the idea.

ronyb29 commented 6 years ago

Gonna try with api.cine.com.do now

ronyb29 commented 6 years ago

only sure-fire way to improve speed and avoid caching is to change to omdb. the OMDB api includes ratings from metacritic, rotten tomatoes and IMDB. But for some tease some blockbusters won't have their IMDB score shown, thyre listed as 'N/A'

kengru commented 6 years ago

Fixed with PR #26