wkentaro / gdown

Google Drive Public File Downloader when Curl/Wget Fails
MIT License
4.11k stars 343 forks source link

Consider moving away from pkg_resources #213

Closed hmaarrfk closed 1 year ago

hmaarrfk commented 1 year ago

I believe that pkg_resources is known to be slow to load on import. Through benchmarking import times, I found that it can add about 50 ms to the import time (most of the import time is dominiated by things that seem necessary like urllib3). While this seems like a nit, a few things can be imporved:

  1. Hardcoding the version in a text file is "easy to understand".
  2. Using tools like https://github.com/jbweston/miniver you can get an idea of development versions that are being used when you are developing your own project.

Would you consider a PR to move to something like miniver?

https://github.com/wkentaro/gdown/blob/843f9a159a55459cb6d79dae93e02c1b6c827c34/gdown/__init__.py#L12

wkentaro commented 1 year ago

Can you have a look at https://github.com/wkentaro/gdown/pull/214?

hmaarrfk commented 1 year ago

Thanks