Ponysearch/utils
Alexandre Flament ed66ed758d [mod] reduce memory footprint by not calling babel.Locale.parse at runtime
babel.Locale.parse loads more than 60MB in RAM.  The only purpose is to get:

    LOCALE_NAMES   - searx.data.LOCALES["LOCALE_NAMES"]
    RTL_LOCALES    - searx.data.LOCALES["RTL_LOCALES"]

This commit calls babel.Locale.parse when the translations are update from
weblate and stored in::

    searx/data/locales.json

This file can be build by::

    ./manage data.locales

By store these variables in searx.data when the translations are updated we save
round about 65MB (usually 4 worker = 260MB of RAM saved.

Suggested-by: https://github.com/searxng/searxng/discussions/2633#discussioncomment-8490494
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20 10:43:20 +01:00
..
templates Docker: add UWSGI_WORKERS and UWSGI_THREAD environment variables (#2992) 2023-11-12 16:46:34 +00:00
brand.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
filtron.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
get_setting.py [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
lib.sh [fix] issues reported by shellcheck v0.9.0 2024-01-09 16:31:19 +01:00
lib_go.sh [doc] improve documentation of make targets and ./manage script 2023-08-06 19:37:12 +02:00
lib_nvm.sh [fix] make nvm.env exit with error when VERBOSE is unset 2023-02-11 13:18:07 +01:00
lib_redis.sh [utils/searxng.sh] implement new script to install SearXNG 2022-07-30 13:39:35 +02:00
lib_sxng_data.sh [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
lib_sxng_node.sh [doc] improve documentation of make targets and ./manage script 2023-08-06 19:37:12 +02:00
lib_sxng_static.sh [fix] issues reported by shellcheck v0.9.0 2024-01-09 16:31:19 +01:00
lib_sxng_test.sh [doc] improve documentation of make targets and ./manage script 2023-08-06 19:37:12 +02:00
lib_sxng_themes.sh [doc] improve documentation of make targets and ./manage script 2023-08-06 19:37:12 +02:00
lib_sxng_weblate.sh [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
lxc-searxng.env [doc] update & fix documentation of the "SearXNG LXC suite" 2023-05-21 18:12:39 +02:00
lxc.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
makefile.include [mod] replace makefile boilerplate by 'manage' script 2021-04-23 11:26:22 +02:00
makefile.lxc [mod] LXC_ENV_FOLDER moved from ./lxc to ./lxc-env 2020-12-26 11:43:18 +01:00
morty.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
searx.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
searxng.sh [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
searxng_check.py [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00