Localhost django dev server vs postgres slow on mac os?

Does any slowness notification from the django dev server work on Mac OS and connecting to the remote (postgres) db? This is not like the DNS issue mentioned elsewhere. We have an intermediate instance in which the same code works in the same remote intermediate field where db is located, and the performance on this instance is very clear.

Here's the output of the performance middleware executed locally:

Total: 19.58 Python: 6.39 DB: 13.19 Requests: 17

And on the intermediate server:

Total: 0.07 Python: 0.05 DB: 0.02 Requests: 16

Maybe he postgres client network overhead from connecting to a remote db or something else? I do not mind development on an intermediate server, but it’s nice to work locally.

+3
source share
2 answers

Two things:

  • The Django dev server is painfully slow. Any external connections will be limited to them.
  • Connecting to an external database is limited by the local upstream and downstream capabilities of your computer (the bottleneck that is usually your Internet connection).

Each time you work locally and connect to an external database server, it will be slow. For parallel development of Drupal at work, we control our folder sitesand use the same database, which, although external, never leaves our local network. It still looks like molasses in Alaska in January.

PostgreSQL . .

+6

, . django_session, Gigabytes. - , . :

TRUNCATE TABLE 'django_session'

: https://dba.stackexchange.com/questions/52733/why-django-session-table-grows-on-postgresql

0

Source: https://habr.com/ru/post/1719765/


All Articles