support/scripts/cpedb.py: drop CPE XML database caching
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 13 Feb 2021 22:19:48 +0000 (23:19 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 14 Feb 2021 09:03:52 +0000 (10:03 +0100)
commitf81b0998eadc8aa8a4f8f205f5fa4d68438fb68d
tree98dd0f14c0e5eefe1bd4d26e09c7efd7587b5c3f
parent797d63e6039de83bb2b466886fafefb17f41d52c
support/scripts/cpedb.py: drop CPE XML database caching

Currently, the CPE XML database is parsed into a Python dict, which is
then pickled into a local file, to speed up the processing of further
invocations.

However, it turns out that since the initial implementation, we have
switched the XML parsing from the out of tree xmltodict module to the
standard ElementTree one, which has made the parsing much faster. The
pickle caching only saves 6 seconds, on something that takes more than
13 minutes total.

In addition, this pickle caching consumes a significant amount of RAM,
causing the Python process to be OOM-killed on a server with 4 GB of
RAM.

So let's just drop this caching entirely.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
support/scripts/cpedb.py