We may not have to do sentiment analysis for all the available video comments.
The most time taking part in the application is analyzing scraped comments sentiment.
So to make the whole process faster (and cheaper), we can follow this approach:
Scrape all available comments of the video
Order all comments by like_count and take top N comments based on like_count
If we can get/scrape comments already sorted by likes, then it's even easier (by adding an 'order_by' param to official or 3rd party API request), so first check if official or 3rd party API can give us comments already sorted by likes, and add limiting to it.
Note: YouTube actually allows sorting comments based on like count (on web browser and on mobile app) So probably we can get comments already sorted from the APIs
We may not have to do sentiment analysis for all the available video comments.
The most time taking part in the application is analyzing scraped comments sentiment.
So to make the whole process faster (and cheaper), we can follow this approach:
If we can get/scrape comments already sorted by likes, then it's even easier (by adding an 'order_by' param to official or 3rd party API request), so first check if official or 3rd party API can give us comments already sorted by likes, and add limiting to it.
Note: YouTube actually allows sorting comments based on like count (on web browser and on mobile app) So probably we can get comments already sorted from the APIs