From a63398778eb88c43a26f5985f40adbbcdd59e712 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 2 Jul 2023 16:22:14 +0530 Subject: [PATCH] perf: tune gc by default This is running on several prod site without any noticable problems, so making it default behaviour. Opt out by setting env variable `FRAPPE_TUNE_GC=False` --- .github/helper/install.sh | 2 -- frappe/__init__.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 5a4d341a9b..5cdcbebe1a 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -54,8 +54,6 @@ fi echo "Starting Bench..." -export FRAPPE_TUNE_GC=True - bench start &> ~/frappe-bench/bench_start.log & if [ "$TYPE" == "server" ] diff --git a/frappe/__init__.py b/frappe/__init__.py index 13e9448109..88b995d17b 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -58,7 +58,7 @@ re._MAXCACHE = ( 50 # reduced from default 512 given we are already maintaining this on parent worker ) -_tune_gc = bool(os.environ.get("FRAPPE_TUNE_GC", False)) +_tune_gc = bool(sbool(os.environ.get("FRAPPE_TUNE_GC", True))) if _dev_server: warnings.simplefilter("always", DeprecationWarning)