summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2021-11-29 10:48:35 (GMT)
committerFrancesco Gazzetta <fgaz@fgaz.me>2021-11-30 15:11:02 (GMT)
commit867785edd909df1cf2dd1866c565daeeb2b82acf (patch)
tree9c5b239d68368dd142342c9514c25db0a10a7be1
parentf11e41b5537c6dfad3cbaa2c1bae8d7ef780649b (diff)
Collect garbage before enabling apps
It especially helps loading big user defined apps. Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
-rw-r--r--wasp/apps/software.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wasp/apps/software.py b/wasp/apps/software.py
index c51036b..7ae3094 100644
--- a/wasp/apps/software.py
+++ b/wasp/apps/software.py
@@ -17,6 +17,7 @@ whilst still allowing users to activate so many awesome applications!
import wasp
import icons
import os
+import gc
class SoftwareApp():
@@ -114,6 +115,7 @@ class SoftwareApp():
if checkbox.touch(event):
label = checkbox.label.replace(' ', '')
if checkbox.state:
+ gc.collect()
wasp.system.register('apps.{}.{}App'.format(module, label))
else:
for app in wasp.system.launcher_ring: