ERPNext runs very slow

run
bench --site sitename mariadb
Copy and paste the below code in the database console

SELECT table_schema as Database, table_name AS Table, round(((data_length + index_length) / 1024 / 1024), 2) Size in MB FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC;

send the output screenshot

1 Like

@Huawei_Hackace

dp_database_size_sort

i`v the same issue with

force index (posting_sort_index)

if u remove it will work smoothly

Where did you do it? @Mahmoud_Ghoneem

Usually running the site in development mode also slows it down. Try running your site in production mode?

Yes I have it on production and no luck, but where id @Mahmoud_Ghoneem removed the “force index”?

Currently, on a v13 development setup, I have the case that development mode makes a static html file take >2 seconds to load (2 CPUs, 8GB RAM). The system gets completely unusable. Anything that can be done about this?

1 Like

I just saw a release note of 17 May which have a enhancement #25475

perf: significant reduction in time taken to save sales documents by sagarvora · Pull Request #25475 · frappe/erpnext (github.com)

Have anyone tried if this helps POS submissions???

I have similar problem in development mode a simple search_link request takes > 20 seconds to complete. Did you have any luck speeding up in developer mode?

EDIT: In production mode the speed is completely fine.

I have a feeling that it got a bit faster now (or maybe I got used to it).

I am frequently switching between two modes:

  • running bench start (with server disabled in Procfile) in he terminal and bench serve with the VSCode debugger
    → this makes it veeery slow
  • running bench start (with server enabled in Procfile)
    → this has a usable speed