owntracks / quicksetup

A (mostly) automated installer for OwnTracks Recorder, Frontend with MQTT and Let's Encrypt
https://owntracks.org/booklet/guide/quicksetup/
12 stars 3 forks source link

Check task duration: why does otrc generation take so long? #28

Closed jpmens closed 7 months ago

jpmens commented 7 months ago

d1

system: generate user .otrc files in userdata ------------------------------------- 12.14s
system: create password files in userdata ------------------------------------------ 8.43s
ot-recorder: add/delete keys for users which have them ----------------------------- 6.75s
nginx: add users to htpasswd ------------------------------------------------------- 6.25s
system: add ufw open ports --------------------------------------------------------- 4.71s
system: install required packages -------------------------------------------------- 4.11s
lego: enroll at letsencrypt -------------------------------------------------------- 1.87s
frontend: unpack dist -------------------------------------------------------------- 1.85s
ot-recorder: install package ------------------------------------------------------- 1.60s
system: create directories --------------------------------------------------------- 1.58s
ot-recorder: launch service -------------------------------------------------------- 1.54s
Gathering Facts -------------------------------------------------------------------- 1.46s
restart_mosquitto ------------------------------------------------------------------ 1.20s
lego: get certificate information -------------------------------------------------- 1.13s
system: enable ufw ----------------------------------------------------------------- 1.10s
system: template out sys.info ------------------------------------------------------ 1.09s
nginx: install OwnTrack's index.php ------------------------------------------------ 1.06s
lego: template out enroller -------------------------------------------------------- 1.06s
system: install OwnTracks repository key ------------------------------------------- 1.05s
lego: template out certificate/key installer --------------------------------------- 1.01s
jpmens commented 7 months ago

Raspi 3B

system: generate user .otrc files in userdata ---------------------- 23.46s
system: create password files in userdata -------------------------- 16.59s
system: install required packages ---------------------------------- 16.36s
system: add ufw open ports ----------------------------------------- 14.13s
ot-recorder: add/delete keys for users which have them ------------- 11.47s
nginx: add users to htpasswd --------------------------------------- 11.02s
ot-recorder: launch service ----------------------------------------- 7.29s
mosquitto: template $HOME/.config/mosquitto_pub --------------------- 6.05s
Gathering Facts ----------------------------------------------------- 6.04s
system: create directories ------------------------------------------ 5.96s
ot-recorder: install package ---------------------------------------- 5.83s
system: template out sys.info --------------------------------------- 5.79s
restart_mosquitto --------------------------------------------------- 4.88s
frontend: unpack dist ----------------------------------------------- 4.88s
system: enable ufw -------------------------------------------------- 3.67s
system: install OwnTracks repository key ---------------------------- 3.52s
lego: get certificate information ----------------------------------- 3.30s
lego: enroll at letsencrypt ----------------------------------------- 3.28s
system: install OwnTracks repository -------------------------------- 3.17s
nginx: template owntracks site configuration ------------------------ 2.65s
jpmens commented 7 months ago

on d1, just the one task takes:

system: generate user .otrc files in userdata ------------------------------------- 10.06s

if I rip out the whole source template files/otrc.j2 and replace by content bla (i.e. no processing whatsoever), the same task takes:

system: generate user .otrc files in userdata -------------------------------------- 9.77s

In other words, this isn't something which is taking a lot of time in the template itself, it's simply that this task takes so long as template is slow.

Nothing we can do about it.