lemon24 / reader

A Python feed reader library.
https://reader.readthedocs.io
BSD 3-Clause "New" or "Revised" License
456 stars 38 forks source link

Startup speed degradation following switch to unvendored werkzeug #316

Closed lemon24 closed 1 year ago

lemon24 commented 1 year ago

Following https://github.com/lemon24/reader/commit/cbe6db1bd06b06a0512f8220ed87cc1ca3c4a6c5, the import times achieved in #297 degraded (due to werkzeug.http depending on urllib.request).

Before:

importreader (84209, 3982)
  reader (72437, 400)
    reader.core (72037, 872)
      reader._parser (45555, 1960)
        reader._types (22352, 5196)

After:

importreader (145000, 5954)
  reader (132528, 397)
    reader.core (132131, 881)
      reader._parser (106227, 2002)
        reader._http_utils (66729, 215)
lemon24 commented 1 year ago

https://github.com/lemon24/reader/commit/3a9affa1fa5a761b3f39c293da293da0bb0d6eae fixes it, with the caveat that add_feed() will end up triggering the rest of the imports (it didn't, before).

With this change, we can probably: