Netdev List
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net,  netdev@vger.kernel.org,
	 edumazet@google.com, pabeni@redhat.com,  andrew+netdev@lunn.ch,
	 horms@kernel.org
Subject: Re: [PATCH net-next] tools: ynl: try to avoid the very slow YAML loader
Date: Thu, 04 Jun 2026 11:41:03 +0100	[thread overview]
Message-ID: <m2wlwed1vk.fsf@gmail.com> (raw)
In-Reply-To: <20260603210810.2636193-1-kuba@kernel.org>

Jakub Kicinski <kuba@kernel.org> writes:

> Turns out Python YAML defaults to a pure Python loader for YAML
> files which is a lot slower than the C loader (using libyaml).
> Try to use the C one whenever possible.
>
> The avg time to run:
>   $ tools/net/ynl/pyynl/cli.py --family tc --no-schema
> drops from 300+ ms to 115 ms with this change (40 samples).
>
> We could drop the load time further to 85 ms if we "compiled"
> the specs to JSON. Slightly tricky parts are that we don't
> currently install the specs at all on make install, so it's
> unclear where to put the conversion. Also JSON has questionable
> support for comments and we need an SPDX line.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: donald.hunter@gmail.com

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

      parent reply	other threads:[~2026-06-04 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 21:08 [PATCH net-next] tools: ynl: try to avoid the very slow YAML loader Jakub Kicinski
2026-06-03 22:08 ` Jacob Keller
2026-06-03 23:35   ` Jakub Kicinski
2026-06-04  0:17     ` Jacob Keller
2026-06-04 10:21       ` Nicolai Buchwitz
2026-06-04 10:41 ` Donald Hunter [this message]

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=m2wlwed1vk.fsf@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox