Hello,
On 5/11/26 12:03, Quentin Schulz via lists.openembedded.org wrote:
Hi João,
On 5/8/26 11:40 PM, João Marcos Costa wrote:
Hello,
Honestly, my main motivation to send this series comes from a time when
I was building u-boot (meta-freescale) and I saw vim-native in Bitbake's
tasks. It blew my mind that a bootloader somehow dependend on a text
editor (yes, only to be built, not to be executed, I know), and the whole
text editor was being built to provide nothing more than xxd.
Just to be clear, what bothers me is NOT u-boot depending on xxd. It is
actually configuring and compiling Vim (considering the overhead this
represents) only to use a single tiny piece of it.
What's the build time impact? Because it may not be worth it in terms of
complexity.
I performed some tests and the data below comes from tmp/buildstats. In
my local.conf:
BB_NUMBER_THREADS = "20"
PARALLEL_MAKE = "-j 20"
Before every run, I ran 'bitbake -c cleansstate XXXX + rm -rf tmp/':
1) Before the splitting:
$ bitbake vim-native
Elapsed time: 18.53 seconds
CPU usage: 3.9%
$ bitbake xxd-native
Elapsed time: 18.52 seconds
CPU usage: 3.9%
2) After the splitting:
$ bitbake vim-native
Elapsed time: 18.49 seconds
CPU usage: 4.0%
$ bitbake xxd-native
Elapsed time: 4.89 seconds
CPU usage: 0.8%
2.1) Since I'm not sure if the total elapsed time counts in the parsing
time, let's also compare the time spent in specific tasks:
vim-native-9.2.0340-r0: do_configure
Elapsed time: 6.81 seconds
vim-native-9.2.0340-r0: do_compile
Elapsed time: 4.43 seconds
vim-xxd-native-9.2.0340-r0: do_configure
Elapsed time: 0.03 seconds
vim-xxd-native-9.2.0340-r0: do_compile
Elapsed time: 0.23 seconds
3) I also compared the 'pn-buildlist' for both targets, and xxd-native
after the splitting is minimal, considering the only dependencies are
defined by BASEDEPENDS.
Another thing to consider is the build time dependencies of vim were in
sstate-cache, so this is not an entirely clean build. If that was the
case, the delta would be even higher (once again: vim's DEPENDS vs.
xxd's BASEDEPENDS).
Note that you also need to specify how much it impacts a build in which
both vim and vim-xxd are brought in the final image, which will result
in a biggest build time.
Well, vim already RDEPENDs on vim-xxd, so by default they are installed
together if you have 'vim' in IMAGE_INSTALL. After the split, it is true
that both recipes will be built, but as per the numbers above, the time
spent building vim-xxd-native is minimal.
As a matter of fact, I do believe that the total elapsed time counts in
the parsing time, because a quick sum of the per-task elapsed time
reveals that the whole thing takes roughly 2 seconds.
$ cat tmp/buildstats/20260511115114/vim-xxd-native-9.2.0340-r0/do_* |
grep "Elapsed time" -B1
The major difference would be seen in the case where you have *only*
vim-xxd in IMAGE_INSTALL:
- before the split, vim is built only to provide vim-xxd
- after the split, only vim-xxd is built and the same package is provided
I made my best effort to keep the runtime side identical so this doesn't
break anything in the final image.
--
Best regards,
João Marcos Costa
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#236809):
https://lists.openembedded.org/g/openembedded-core/message/236809
Mute This Topic: https://lists.openembedded.org/mt/119222473/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-