num2words - 260KB - Used frequently on ERPNext sites.
babel - 1.1MB Gets imported because of dates, localization
sentry - 2.8MB should be loaded only if envvar is set
gettext - required for reading translations
These can still be configured to different number. We are just changing
defaults. Why?
- Scheduled job log - errors get logged in error log anyway. Success log
isn't that useful of 90 days?
- Prepared report - most reports are expired in a day or max a week.
Rarely last month's report makes any sense today.
- better boot config name
- send sentry after - because frappe namespce doesn't exist if it starts
first
- remove import in app.py because __init__ is always imported so no
need.
- leave telemetry JS always present, this is used even when telemetry is
not enabled.
Inspired primarily from sentry's generic WSGI integration
Environment variable `FRAPPE_SENTRY_DSN` needs to be enabled as well
as explicit opt-in from the user's side in system sid telemetry
settings
Conditionally include telemetry JS bundles
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* chore!: remove redundant translation
* refactor!: remove "get_translated_dict" hook
Instead, include the results from
`frappe.geo.country_info.get_translated_dict` in `get_all_translations`.
* test: money_in_words uses translated currency
... and now we have translations.
* Revert "test: money_in_words uses translated currency"
This reverts commit e07d594ac1ce4b120c0fceb5d23377cb981fe820.
* refactor!: stop translating timezone and currency
* refactor: rename `get_translated_dict`
... to `get_translated_countries`
| Metric | Before | After | Change |
| --- | --- | --- | --- |
| app.html first response size | 421kb | 106kb | -75% (!) |
| First response duration | 60ms | 40ms | -33% |
huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726
Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>