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>
2.1 KiB
searxng_extra/update/
[source] <searxng_extra/update/__init__.py>
Scripts to update static data in searx/data/
update_ahmia_blacklist.py
[source] <searxng_extra/update/update_ahmia_blacklist.py>
searxng_extra.update.update_ahmia_blacklist
update_currencies.py
[source] <searxng_extra/update/update_currencies.py>
searxng_extra.update.update_currencies
update_engine_descriptions.py
[source] <searxng_extra/update/update_engine_descriptions.py>
searxng_extra.update.update_engine_descriptions
update_external_bangs.py
[source] <searxng_extra/update/update_external_bangs.py>
searxng_extra.update.update_external_bangs
update_firefox_version.py
[source] <searxng_extra/update/update_firefox_version.py>
searxng_extra.update.update_firefox_version
update_engine_traits.py
[source] <searxng_extra/update/update_engine_traits.py>
searxng_extra.update.update_engine_traits
update_osm_keys_tags.py
[source] <searxng_extra/update/update_osm_keys_tags.py>
searxng_extra.update.update_osm_keys_tags
update_pygments.py
[source] <searxng_extra/update/update_pygments.py>
searxng_extra.update.update_pygments
update_locales.py
[source] <searxng_extra/update/update_locales.py>
searxng_extra.update.update_locales
update_wikidata_units.py
[source] <searxng_extra/update/update_wikidata_units.py>
searxng_extra.update.update_wikidata_units