Activating Persistent Storage is slow
From wb:610a1c7462be3f34c10cf580ab7fb0d5:
=== content of /run/tails-persistent-storage/profiles/61.31-Service.Activate.ufel9l6n ===
17182 function calls (17123 primitive calls) in 25.759 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 25.759 25.759 {built-in method builtins.exec}
1 0.000 0.000 25.759 25.759 <string>:1(<module>)
1 0.000 0.000 25.759 25.759 object.py:155(handle_method_call_inner)
1 0.000 0.000 25.759 25.759 service.py:185(Activate)
23 0.000 0.000 25.699 1.117 subprocess.py:358(check_call)
23 0.000 0.000 25.699 1.117 subprocess.py:341(call)
54 0.000 0.000 25.671 0.475 subprocess.py:1184(wait)
54 0.000 0.000 25.671 0.475 subprocess.py:1887(_wait)
27 0.000 0.000 25.671 0.951 subprocess.py:1874(_try_wait)
27 25.671 0.951 25.671 0.951 {built-in method posix.waitpid}
15 0.000 0.000 22.092 1.473 config_file.py:103(parse)
40 0.001 0.000 22.086 0.552 {built-in method io.open}
41 0.000 0.000 22.086 0.539 {built-in method builtins.next}
30 0.000 0.000 22.086 0.736 config_file.py:181(_open)
15 0.000 0.000 22.086 1.472 contextlib.py:112(__enter__)
15 0.000 0.000 22.084 1.472 config_file.py:166(_opener)
1 0.000 0.000 19.907 19.907 service.py:442(refresh_features)
13 0.000 0.000 17.602 1.354 feature.py:263(refresh_is_active)
13 0.000 0.000 17.484 1.345 config_file.py:150(contains)
1 0.000 0.000 5.824 5.824 service.py:213(do_activate)
2 0.000 0.000 3.589 1.794 executil.py:48(execute_hooks)
1 0.000 0.000 3.479 3.479 service.py:509(run_on_activated_hooks)
Activating took 25.759 seconds in total of which 25.699 were spent in subprocess.py:358(check_call)
and 22.084 in config_file.py:166(_opener)
. That means the culprit is:
# Ensure changes made elsewhere are written synchronously on the disk
# (in case something else ever needs to modify this file)
subprocess.check_call(["chattr", "+S", path])
Edited by segfault