diff --git a/docs/docs/content/maintenance/performance.md b/docs/docs/content/maintenance/performance.md new file mode 100644 index 000000000..4b1172167 --- /dev/null +++ b/docs/docs/content/maintenance/performance.md @@ -0,0 +1,15 @@ +# Performance + +listmonk is built to be highly performant and can handle millions of subscribers with minimal system resources. + +However, as the Postgres database grows—with a large number of subscribers, campaign views, and click records—it can significantly slow down certain aspects of the program, particularly in counting records and aggregating various statistics. For instance, loading admin pages that do these aggregations can take tens of seconds if the database has millions of subscribers. + +- Aggregate counts, statistics, and charts on the landing dashboard. +- Subscriber count beside every list on the Lists page. +- Total subscriber count on the Subscribers page. + +However, at that scale, viewing the exact number of subscribers or statistics every time the admin panel is accessed becomes mostly unnecessary. On installations with millions of subscribers, where the above pages do not load instantly, it is highly recommended to turn on the `Settings -> Performance -> Cache slow database queries` option. + +## Slow query caching + +When this option is enabled, the subscriber counts on the Lists page, the Subscribers page, and the statistics on the dashboard, etc., are no longer counted in real-time in the database. Instead, they are updated periodically and cached, resulting in a massive performance boost. The periodicity can be configured on the Settings -> Performance page using a standard crontab expression (default: `0 3 * * *`, which means 3 AM daily). Use a tool like [crontab.guru](https://crontab.guru) for easily generating a desired crontab expression. diff --git a/docs/docs/mkdocs.yml b/docs/docs/mkdocs.yml index 2fa459f7c..21cc5c90d 100644 --- a/docs/docs/mkdocs.yml +++ b/docs/docs/mkdocs.yml @@ -54,6 +54,7 @@ nav: - "Internationalization": "i18n.md" - "Integrating with external systems": external-integration.md - "API": + - "Introduction": apis/apis.md - "Subscribers": apis/subscribers.md - "Lists": apis/lists.md - "Import": apis/import.md @@ -61,5 +62,7 @@ nav: - "Media": apis/media.md - "Templates": apis/templates.md - "Transactional": apis/transactional.md + - "Maintenance": + - "Performance": maintenance/performance.md - "Contributions": - "Developer setup": developer-setup.md diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index e279e4c6f..9a913e67f 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -139,7 +139,7 @@

*{{ $t('globals.messages.slowQueriesCached') }} - {{ $t('globals.buttons.learnMore') }} diff --git a/frontend/src/views/Lists.vue b/frontend/src/views/Lists.vue index 1c3bdc1d9..953d734b3 100644 --- a/frontend/src/views/Lists.vue +++ b/frontend/src/views/Lists.vue @@ -145,7 +145,7 @@

*{{ $t('globals.messages.slowQueriesCached') }} - {{ $t('globals.buttons.learnMore') }} diff --git a/frontend/src/views/settings/performance.vue b/frontend/src/views/settings/performance.vue index 2e8abc57d..6c9bb0005 100644 --- a/frontend/src/views/settings/performance.vue +++ b/frontend/src/views/settings/performance.vue @@ -69,7 +69,7 @@



- + {{ $t('globals.buttons.learnMore') }}