I further worked on the topic, since I really want to solve it.
I figured out, that the SQL-queries are already performed during 
"Performing system checks...". 
Does that make sense?
However, I still don't understand why it's taking so much time.

For more details and also an minimal example see here:
Question on StackOverFlow 
<https://stackoverflow.com/questions/68446241/djangos-performing-system-checks-takes-ages-with-postgresql>

Oliver Küchler schrieb am Dienstag, 27. Juli 2021 um 16:20:29 UTC+2:

>
> Hey guys,
>
> I have already opened a question on StackOverflow, but so far nobody was 
> able to help me out (link: StackOverflow-Link 
> <https://stackoverflow.com/questions/68446241/why-does-djangos-system-check-take-so-much-time-import-django-db-models-sql>).
>  
> So I thought I'd give it a try in this group. (And I'm also not sure, 
> whether it's a bug or something else...)
>
> *My Problem:*
>
> So I set up a webpage/webapplication that is powered by Django. Previously 
> I utilized a MySQL database as backend and everything worked out smooth, 
> but then I tried to switch to *PostGreSQL*.
>
> When I now try to start the Django-server in the shell it keeps getting 
> stuck when the system checks are performed... From there it takes a very 
> long time (circa 7-8 minutes) with my computer using a lot of CPU until 
> finally the server starts with no issues.
>
> If I run "python -v manage.py check", I can see that Django is getting 
> stuck on 2 things:
>
>    1. import 'django.db.models.sql.compiler' # 
> <_frozen_importlib_external.SourceFileLoader 
>    object at 0x7ff640701890>
>    2. import 'plotly.express' # <_frozen_importlib_external.SourceFileLoader 
>    object at 0x7ff640744d50>
>
> Also I realized that the problem disappears if I comment out python files 
> that use Dash.
>
> I tried to build a very simple app to catch the beginning of the error, 
> but it's really hard to localize and I'm slowly going crazy... 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/937d309e-6212-4f0d-beb4-9eb0b32066c8n%40googlegroups.com.

Reply via email to