Commit graph

10 commits

Author SHA1 Message Date
Rohan McGovern
c60b63996c Release 1.2.1 2024-01-15 08:07:02 +10:00
Rohan McGovern
eac74ec1e4 Further reduce memory usage on large yum repos [RHELDST-20453]
The Fetcher type was designed to return a 'str'.
That wasn't a good idea because it implies that every fetched file must
be loaded into memory completely. On certain large yum repos,
decompressed primary XML can be hundreds of MB, and it's not appropriate
to require loading that all into memory at once.

Make it support a file-like object (stream of bytes). Since the SAX
XML parser supports reading from a stream, this makes it possible to
avoid loading everything into memory at once.

A test of repo-autoindex CLI against
/content/dist/rhel/server/7/7Server/x86_64/os showed major
improvement:

- before: ~1200MiB
- after:    ~80MiB

Note that achieving the full improvement requires any downstream users
of the library (e.g. exodus-gw) to update their Fetcher implementation
as well, to stop returning a 'str'.
2023-09-21 11:05:21 +10:00
Rohan McGovern
efb595d624 Add py.typed for PEP 561
This library includes inline type hints, but per PEP 561 this must be
indicated by including a "py.typed" marker file, otherwise tools like
mypy will not make use of the type hints when checking downstream
projects.
2023-09-18 13:28:02 +10:00
Rohan McGovern
ceb2f37ddf Release 1.1.1 2023-04-12 14:08:21 +10:00
Rohan McGovern
bc5b0c3f23 Release 1.1.0 2023-04-04 09:57:52 +10:00
Rohan McGovern
dfd6244e2b Release 1.0.2 2022-10-21 09:00:36 +10:00
Rohan McGovern
6f9abbdeb5 Release 1.0.1 2022-08-15 09:43:43 +10:00
Rohan McGovern
6900caa7a7 Improve README 2022-08-15 09:30:59 +10:00
Rohan McGovern
e27033d1f4
README.md: add an example 2022-06-17 10:38:38 +10:00
Rohan McGovern
cde2b61fe5
Initial commit 2022-06-17 10:00:43 +10:00