2 ms·
My guess would be the filesystem, especially if you're using Vbox Shared Folders (either directly or through Vagrant.) If you're on Mac or Linux, you can massi
by jchw 9y ago
My guess would be the filesystem, especially if you're using Vbox Shared Folders (either directly or through Vagrant.)
If you're on Mac or Linux, you can massively reduce the amount of filesystem overhead by using Docker (or Docker Compose) for local testing, since on Linux it'll get direct access to the FS and on Mac it will use the special osxfs driver. You can also try using nfs to mount your drives instead of vbox shared folders if you want a quick gain, but it will make hot reloading even less reliable.
You may also want to be sure your settings are really the same. Does DEBUG=0 change anything? What cache backend are you using? Etc.
Finally, if none of the above helps you can try a move of desperation: try to get the app working on your native OS with no container or VM layer.
- mooneater 9y agoWow your suggestion really helped: Debug toolbar itself was causing this for some reason. How embarrassing. Thanks!
- jchw 9y agoThat is rather surprising, because I don't have the same issue with a pretty large production app. I wonder if there's a deeper underlying issue.
- mooneater 9y agoOk I upgraded toolbar from 1.7 to 1.8 and problem is gone :) There are a number of toolbar bugs at https://github.com/jazzband/django-debug-toolbar/issues/943 https://github.com/jazzband/django-debug-toolbar/issues/943 involving keywords "slow" and "hang", not sure which it was. But the meta-issue is, the profiling tools I used were not super helpful in discovering what the issue was.