searxng/searx
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
..
answerers [mod] random answerer: add random hex color generator 2023-08-27 18:59:54 +02:00
botdetection Block HeadlessChrome (#3116) 2024-01-17 09:14:36 +01:00
data [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
enginelib [fix] spelling 2023-09-18 16:20:27 +02:00
engines [mod] engine ask.com - parse JS result to JSON 2024-02-18 09:17:22 +01:00
infopage [clean] drop obsolete py3.7 compatibility 2024-02-10 09:27:19 +01:00
metrics [fix] spelling 2023-09-18 16:20:27 +02:00
network [fix] spelling 2023-09-18 16:20:27 +02:00
plugins [mod] isolation of botdetection from the limiter 2023-11-01 06:44:56 +01:00
search [fix] SyntaxWarning: invalid escape sequence '\>' 2024-01-15 18:27:21 +01:00
static [build] /static 2024-01-31 17:22:03 +01:00
templates/simple [mod] footer: i18n for the link names in the footer 2024-02-10 08:03:43 +01:00
translations [translations] update from Weblate 2024-02-16 15:48:10 +01:00
__init__.py [mod] document server:public_instance & remove it out of the botdetection 2023-11-01 06:44:56 +01:00
autocomplete.py [feat] autocompleter: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
babel_extract.py [mod] move category and names of constants to searx/searxng.msg 2022-03-16 09:55:53 +01:00
exceptions.py [fix] spelling 2023-09-18 16:20:27 +02:00
external_bang.py [mod] external bang: go to main instead of search page when query is empty 2023-04-25 15:02:34 +02:00
external_urls.py [fix] typos / reported by @kianmeng in searx PR-3366 2022-09-27 18:32:14 +02:00
flaskfix.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
limiter.py [mod] document server:public_instance & remove it out of the botdetection 2023-11-01 06:44:56 +01:00
limiter.toml [mod] isolation of botdetection from the limiter 2023-11-01 06:44:56 +01:00
locales.py [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
preferences.py [mod] add hotkeys option to settings.yml 2023-10-09 18:13:00 +02:00
query.py [feat] implement feeling lucky feature 2023-09-19 09:40:57 +02:00
redisdb.py move searx.shared.redisdb to searx.redisdb 2022-12-10 09:26:38 +01:00
redislib.py [fix] spelling 2023-09-18 16:20:27 +02:00
results.py [fix] KeyError: 'title' in results using key-value.html template 2024-02-06 07:53:39 +01:00
searxng.msg [mod] footer: i18n for the link names in the footer 2024-02-10 08:03:43 +01:00
settings.yml [feat] engine: implementation of ask.com 2024-02-18 09:17:22 +01:00
settings_defaults.py [mod] footer: i18n for the link names in the footer 2024-02-10 08:03:43 +01:00
settings_loader.py [fix] spelling 2023-09-18 16:20:27 +02:00
sxng_locales.py [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
unixthreadname.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
utils.py [fix] HTMLParser: undocumented not implemented method 2023-10-22 10:35:02 +02:00
version.py [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
webadapter.py Revert "[fix] limit maximum page number of a search query to page 50." (#2979) 2023-11-01 16:55:20 +00:00
webapp.py [feat] preferences: button to copy input to restore preferences hash 2024-01-29 18:09:22 +01:00
webutils.py [fix] do highlight replacement at once 2024-01-29 13:15:37 +01:00