1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-11 07:20:13 +01:00
searxng/docs/dev
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
..
engines [mod] presearch: add language & region support 2024-01-15 19:23:26 +01:00
searxng_extra [mod] reduce memory footprint by not calling babel.Locale.parse at runtime 2024-02-20 10:43:20 +01:00
contribution_guide.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
csv_table.txt docs: reST-primer describe table markup (WIP) 2019-12-20 20:39:14 +01:00
hello.dot doc: add content to reST primer (WIP) // linuxdoc 2019-12-19 23:36:53 +01:00
index.rst [dev] manage runtime versions with asdf 2023-11-12 20:54:57 +01:00
lxcdev.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
makefile.rst [mod] get rid of ./utils/brand.env and its workflow 2024-01-09 16:31:19 +01:00
plugins.rst [doc] code and sytle injection is not supported by the simple theme 2023-06-13 11:57:40 +02:00
quickstart.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
reST.rst [fix] remove twine from requirements-dev 2024-02-16 18:29:40 +01:00
rtm_asdf.rst [dev] manage runtime versions with asdf 2023-11-12 20:54:57 +01:00
search_api.rst [feat] autocompleter: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
svg_image.svg doc: add content to reST primer (WIP) // linuxdoc 2019-12-19 23:36:53 +01:00
translation.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
translation.svg [fix] translation: lock weblate only when there is an actual change of messages.pot 2021-09-06 17:16:51 +02:00