Systemd/src/systemctl
Zbigniew Jędrzejewski-Szmek 4562c35527 core: store unit aliases in a separate set
We allocated the names set for each unit, but in the majority of cases, we'd
put only one name in the set:

$ systemctl show --value -p Names '*'|grep .|grep -v ' '|wc -l
564
$ systemctl show --value -p Names '*'|grep .|grep ' '|wc -l
16

So let's add a separate .id field, and only store aliases in the set, and only
create the set if there's at least one alias. This requires a bit of gymnastics
in the code, but I think this optimization is worth the trouble, because we
save one object for many loaded units.

In particular set_complete_move() wasn't very useful because the target
unit would always have at least one name defined, i.e. the optimization to
move the whole set over would never fire.
2020-06-10 09:36:58 +02:00
..
systemctl.c core: store unit aliases in a separate set 2020-06-10 09:36:58 +02:00
systemd-sysv-install.SKELETON systemd-sysv-install: unset ROOT rather than setting it to "" 2018-02-27 19:59:09 +01:00
sysv-compat.c Merge pull request #12119 from keszybz/voidify-mkdir-p 2019-03-27 15:05:51 +01:00
sysv-compat.h systemctl: define less stuff when !HAVE_SYSV_COMPAT 2019-03-26 19:06:48 +01:00