From: "Lukas Woodtli" <lw@hqv.ch>
To: openembedded-core@lists.openembedded.org
Subject: Re: python3: Allow to specify which pyc files to keep
Date: Thu, 10 Apr 2025 06:05:21 -0700 [thread overview]
Message-ID: <31851.1744290321098835072@lists.openembedded.org> (raw)
In-Reply-To: <CANNYZj9r9D7PzkGm-5tPQVTyU_MkyQngS+RbZii6+4YToGNLVg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]
>
>
>
>> The key question is whether this level of configuration is generally
>> useful enough to be worth us maintaining it in OE-Core. I don't know if
>> this is something you needed for a one off investigation or that people
>> need it in general.
>
> I think it would be good to step back and look at what these
> optimization levels actually do. Upstream clearly treats them as
> optional opt-in via python interpreter command line switch or
> environment variable, which means they don't think picking a higher
> default level is something python users should be doing. So why would
> we be going against this approach?
>
>
The reason to use these features of the Python interpreter is that we develop for
resource restricted devices. The target device should not need to compile the Python
files to byte-code at runtime (which happens regardless of the optimization level).
We can do this work at build time. Moreover, Embedded devices usually
have restricted storage size. So using the optimization level 2 for pyc files is sensible.
Most embedded devices don't need the docstrings in the Python files (simmilar to
not needing the man pages). So we can get rid of them (that is what optimization
level 2 does, apart from disabling asserts).
Lukas
[-- Attachment #2: Type: text/html, Size: 1518 bytes --]
next prev parent reply other threads:[~2025-04-10 13:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 6:37 python3: Allow to specify which pyc files to keep Lukas Woodtli
2025-04-10 8:02 ` [OE-core] " Alexander Kanavin
2025-04-10 11:36 ` Lukas Woodtli
2025-04-10 11:58 ` [OE-core] " Richard Purdie
2025-04-10 12:11 ` Alexander Kanavin
2025-04-10 13:05 ` Lukas Woodtli [this message]
2025-04-10 14:31 ` Alexander Kanavin
2025-04-11 8:55 ` Mike Looijmans
2025-04-17 9:19 ` Lukas Woodtli
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=31851.1744290321098835072@lists.openembedded.org \
--to=lw@hqv.ch \
--cc=openembedded-core@lists.openembedded.org \
/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