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:05:00 +0000 (10:05 +0100)
commit09a71e6a756360f2cd96938af9c719391adfb950
treef286ac77511048e5c1afbef47a4d8d1a912d3310
parent21ef97df91143eb191e565d5250527148e53b660
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