AndroidOnAppleDevice
Newbie
- Apr 20, 2023
- 38
- 9
If I was making only api calls it would be way faster. That's why I did at first.Not even. Multi-threading will add a lot of over-head due to resources allocations by each Thread. Making API calls is pure I/O operation locks, and you can leverage on asynchronicity to perform concurrent operation while the GIL lock (awaiting a request-response) happens.
Then I switched to scrapping the web interface of deepl with puppeteer (I'm using nodejs btw).
It's a bit slow bc I need to open and close a web browser after each translation in order to use a different proxy each time.
There's better way to do that though, for example having the same browser open all the time, and use a proxy per page, instead of a proxy per browser, but I went for the quickest way to implement to me.
The best would be either :
- making api calls only (don't know any way to do that without having an api key)
- self host the translation algorithm (then the question becomes, which algorithm is at least as good as deepl to self host)