All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/2] support/scripts/pkg-stats: add support for CVE reporting
Date: Wed, 19 Feb 2020 22:34:07 +0100	[thread overview]
Message-ID: <87mu9ecldc.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <CAAXf6LV8MSXPGrQW2GUhJcR4pjupw2EHFb7H6x4R0OkbrYFiMQ@mail.gmail.com> (Thomas De Schampheleire's message of "Wed, 19 Feb 2020 21:33:45 +0100")

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

Hi,

 > In the memory usage, RES first increased to ~4G, and then dropped back
 > to 2.2G. I think this is the Python garbage collector kicking in,
 > _after_ the new file is loaded.
 > So the worst case memory usage is roughly the size of two largest
 > subsequent years.

 > Doing some quick google search, I stumbled upon the 'pandas' python
 > package, which has a read_json function too. During a quick test, it
 > seemed to be more memory efficient, and the total memory size on
 > subsequent reads stayed in the 2.x GB range.

 > content = pandas.read_json('/tmp/nvd/nvdcve-1.0-2019.json.gz')
 > content = pandas.read_json('/tmp/nvd/nvdcve-1.0-2018.json.gz')

 > In the full test of pkg-stats, I still saw a peak memory usage near
 > the end, but it 'seemed' better :-)

Or perhaps something that doesn't load the entire json structure into
memory? Jsonslicer seems like a possible solution:

https://pypi.org/project/jsonslicer/

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2020-02-19 21:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15 12:44 [Buildroot] [PATCH v3 0/2] Add CVE reporting to pkg-stats Titouan Christophe
2020-02-15 12:44 ` [Buildroot] [PATCH v3 1/2] support/scripts/pkg-stats: add support for CVE reporting Titouan Christophe
2020-02-15 15:49   ` Peter Korsgaard
2020-02-19 18:48   ` Thomas Petazzoni
2020-02-19 20:33     ` Thomas De Schampheleire
2020-02-19 21:34       ` Peter Korsgaard [this message]
2020-02-20  6:31         ` Thomas De Schampheleire
2020-02-20  7:03           ` Peter Korsgaard
2020-02-20 10:26       ` Titouan Christophe
2020-02-20 11:42         ` Peter Korsgaard
2020-02-15 12:44 ` [Buildroot] [PATCH v3 2/2] docs/manual: describe the new <pkg>_IGNORE_CVES variable Titouan Christophe
2020-02-15 15:50   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu9ecldc.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.