You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/bin/sh -c '! ( # subshell 1
test -e /var/cache/motd/mdinfra.motd || test -L /var/cache/motd/mdinfra.motd
) ||
( # subshell 2
stat -c \'user=%U group=%G mode=%A atime=%X mtime=%Y ctime=%Z size=%s %N\' /var/cache/motd/mdinfra.motd 2> /dev/null || stat -f \'user=%Su group=%Sg mode=%Sp atime=%a mtime=%m ctime=%c size=%z %N%SY\' /var/cache/motd/mdinfra.motd || ls -ld /var/cache/motd/mdinfra.motd
)'
i.e. two unnecessary subshells spawned. On modern machines, one does not notice this, but on embedded/old systems, there is actual a compounding difference.
Instead of ( foo || bar ) || ( baz || bam ), it's actually POSIX-compliant to write: { foo || bar; } || { baz || bam; } to get the exact same logic but without the subshells.
Would this be worth a consideration to further improve the performance of pyinfra?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I just noticed the following in the logs:
this is:
i.e. two unnecessary subshells spawned. On modern machines, one does not notice this, but on embedded/old systems, there is actual a compounding difference.
Instead of
( foo || bar ) || ( baz || bam ), it's actually POSIX-compliant to write:{ foo || bar; } || { baz || bam; }to get the exact same logic but without the subshells.Would this be worth a consideration to further improve the performance of pyinfra?
All reactions