liminspace / django-mjml

The simplest way to use MJML in Django templates.
MIT License
263 stars 32 forks source link

Allow `check_mjml_command()` to be skipped on app start #71

Closed marcelchastain closed 5 years ago

marcelchastain commented 5 years ago

Creating this issue in response to performance issues observed when the mjml app was included in installed apps.

We observed a slowdown of several seconds for app starts, restarts/reloads, and test runs, due to the check_mjml_command() invocation in MJMLConfig.ready(). As best as we can tell there is currently no way to avoid this performance hit on every app start/test run/reload.

Once a server has been configured in a stable environment, the administrator should have some level of control over whether this command is invoked every time a django process starts.

Our suggestion is to include a simple boolean setting (MJML_SKIP_CMD_CHECK?) which will allow an administrator to have fine-grained control over this startup behavior.

(PS: Thanks for creating this great library!)

liminspace commented 5 years ago

This possibility will be implemented in next release. Thanks.