vaibhavsingh97 / random-word

This is a simple python package to generate random english words
https://pypi.org/project/random-word/
MIT License
123 stars 25 forks source link

God it is slow....so so slow #59

Closed cyberfox1 closed 3 years ago

cyberfox1 commented 3 years ago

How can it be so slow to generate a random word? Is it downloading word list from internet every time?

RapidCompiler commented 3 years ago

Well, it does make a call to the API backend positioned somewhere in the world, randomly selecting a word from a dictionary containing thousands of them and then returning it back. So, yeah the small latency is expected everytime when a call is made to the backend and could be even longer if the network speed is slow.

vaibhavsingh97 commented 3 years ago

As explained by @RapidCompiler, this package call API which can add small delay while requesting a random word.