made gc modification optional

This commit is contained in:
Hellow 2023-04-04 22:07:56 +02:00
parent fabb6bed00
commit 48ec718757
2 changed files with 20 additions and 14 deletions

View File

@ -4,9 +4,10 @@ import logging
import re import re
from . import objects, pages from . import objects, pages
from .utils.shared import MUSIC_DIR, NOT_A_GENRE, get_random_message from .utils.shared import MUSIC_DIR, NOT_A_GENRE, MODIFY_GC, get_random_message
if MODIFY_GC:
""" """
At the start I modify the garbage collector to run a bit fewer times. At the start I modify the garbage collector to run a bit fewer times.
This should increase speed: This should increase speed:

View File

@ -7,6 +7,11 @@ from sys import platform as current_os
from pathlib import Path from pathlib import Path
import random import random
# modifies the garbage collector to speed up the program
# https://mkennedy.codes/posts/python-gc-settings-change-this-and-make-your-app-go-20pc-faster/
# https://web.archive.org/web/20221124122222/https://mkennedy.codes/posts/python-gc-settings-change-this-and-make-your-app-go-20pc-faster/
MODIFY_GC: bool = True
""" """
I will now and then use those messages in the programm. I will now and then use those messages in the programm.
But I won't overuse them dw. But I won't overuse them dw.
@ -22,7 +27,7 @@ HAPPY_MESSAGES: List[str] = [
"🏳️‍⚧️🏳️‍⚧️ Trans women are women, trans men are men. 🏳️‍⚧️🏳️‍⚧️", "🏳️‍⚧️🏳️‍⚧️ Trans women are women, trans men are men. 🏳️‍⚧️🏳️‍⚧️",
"🏴‍☠️🏴‍☠️ Unite under one flag, fuck borders. 🏴‍☠️🏴‍☠️", "🏴‍☠️🏴‍☠️ Unite under one flag, fuck borders. 🏴‍☠️🏴‍☠️",
"Join my Matrix Space: https://matrix.to/#/#music-kraken:matrix.org", "Join my Matrix Space: https://matrix.to/#/#music-kraken:matrix.org",
"Gotta love the BPJM!! :/" "Gotta love the BPJM!! >:("
] ]