OutsideIT / FireMotD

:fire: Fire Framework Linux MoTD Generator :fire:
https://outsideit.net/firemotd
GNU General Public License v3.0
174 stars 45 forks source link

Slowness of themes based on theme files #125

Closed Tontonitch closed 5 years ago

Tontonitch commented 6 years ago

Issue Type

Enhancement Request

Issue Detail

Looking to update from 7.11.170608 to the current 10.03.180725, I've noticed that executing firemotd using all the themes based on a theme file are slower. On version 7.11.170608 every themes were included inside the firemotd script.

It would be nice to have better performances, it it is at least 2 times slower than before.

For info:

version theme theme location time info
7.11.170608 orange internal real: 0m1.761s, user: 0m0.303s, sys: 0m0.594s
10.03.180725 Original internal real: 0m2.024s, user: 0m0.547s, sys: 0m0.675s
10.03.180725 Invader internal real: 0m1.896s, user: 0m0.468s, sys: 0m0.586s
10.03.180725 Modern external file real: 0m3.712s, user: 0m1.484s, sys: 0m1.467s
10.03.180725 Blue external file real: 0m3.460s, user: 0m1.365s, sys: 0m1.313s

Environment info

willemdh commented 6 years ago

@Tontonitch Hmm, I noticed that too, but imho the advantages of external theme files are worth it. I'm not going back to the hardcoded themes anyway. If I find some time I'll check if I can speed up things a bit. Maybe an extra option which displays a theme without the theme line parameters.

If you have any suggestions without having to revert to hardcoded theme files :)

willemdh commented 5 years ago

@Tontonitch

Please try https://github.com/OutsideIT/FireMotD/releases/tag/v11.01.190105 and let me know if things are better once you have a cache file for the theme you are running. My tests say it runs in +- 1,5 seconds with cache and 2,5 without (live)

Also wanted to add that if you omit the CpuUsage from the theme you want to use it will be 1 seconds faster, as the mpstat takes an average oc all cpu's over 1 second.

willemdh commented 5 years ago

@Tontonitch Please also try multithreading with https://github.com/OutsideIT/FireMotD/releases/tag/v11.02.190106 For example: ./FireMotD -T Eline -MT

This is still an experimental feature though.