Has Anyone Successfully Compiled a Frappe/ERPNext App for Better Performance?

Has anyone successfully compiled a Frappe/ERPNext application (or parts of it) using tools such as Nuitka, Codon, Cython, mypyc, JIT, or PyPy?

My primary goal is not source-code protection but reducing memory usage and CPU overhead in production.

I’m aware that Frappe relies heavily on dynamic behavior (DocTypes, hooks, app discovery, metadata-driven models, etc.), so I’m particularly interested in real-world experiences rather than theoretical possibilities.

Questions:

  1. Has anyone compiled a full Frappe app, custom app, worker, or bench component?

  2. Which tool did you use?

  3. Did you observe any measurable reduction in RAM usage?

  4. Did you observe any improvement in request latency, background job throughput, or overall CPU usage?

  5. Were there compatibility issues with Frappe, ERPNext, custom DocTypes, or third-party apps?

  6. If compilation wasn’t worthwhile, what ended up giving you the biggest memory/performance improvements instead?

1 Like