dcramer / django-devserver

A drop-in replacement for Django's runserver.
BSD 3-Clause "New" or "Revised" License
1.27k stars 159 forks source link

Realtime SQL Hangs on bulk_create #83

Closed RonnyPfannschmidt closed 4 years ago

RonnyPfannschmidt commented 11 years ago

whenn running a large bulk create while having sql realtime enabled, the python process did take 100% cpu and no query was sent out

the issue disappeared with disableing the sql display

schinckel commented 10 years ago

I suspect it may have just been taking a long time.

I saw similar behaviour with a query that UPDATEd a fair chunk of JSON data into a model. With the real-time SQL module on, it took 8 sec to run the whole view, with it off, it was less than 0.2 seconds. The query itself was fast: but it seems that logging it takes a long time.

schinckel commented 10 years ago

I have a commit that kind-of fixes this: https://github.com/schinckel/django-devserver/commit/dedaf45499a62cbf087d496a16b6f82eb4dea81a

It does not log any data that is going to be committed, as I couldn't manage to get a regex that will match columns, and only truncate data that is long.

RonnyPfannschmidt commented 4 years ago

closing to get if off my plate on github