Performance regression using FileField and Django 3.1
See original GitHub issueI’ve met problem with using dirtyfields
for FileField
. Previous Django version used simpler implementation of __getstate__
, and 3.1 add instance
to state, so deepcopy
also copies instance, which is much slower and consume more memory.
Django changes: https://github.com/django/django/commit/f600e3fad6e92d9fe1ad8b351dc8446415f24345 deepcopy: https://github.com/romgar/django-dirtyfields/blob/develop/src/dirtyfields/dirtyfields.py#L95
_Originally posted by @ron8mcr in https://github.com/romgar/django-dirtyfields/issues/153#issuecomment-678922807_
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
Changelog — django-model-utils 4.3.1 documentation
Revert GH-130, restoring ability to access FieldTracker changes in overridden save methods or post_save handlers. This reopens GH-83 (inability ...
Read more >Performance and optimization - Django documentation
This document provides an overview of techniques and tools that can help get your Django code running more efficiently - faster, and using...
Read more >Compare Django release notes | CodeReview.doctor
Fixed a regression in Django 3.1 that caused suppressing connection errors when JSONField is used on SQLite (#32224).
Read more >django-model-utils Documentation - Read the Docs
To use django-model-utils in your Django project, just import and use the utility ... Fix performance regression of FieldTracker on FileField subclasses on ......
Read more >Getting error "SuspiciousFileOperation" after Django Version ...
9, on Django: 3.1.8 it works fine. I have a Files model with a FileField as below: class JobFiles(BaseModel): ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello! Any update on this issue? We are encountering this on a FileField, it doubles the time of our test pipeline. Is there any way to ignore this field from the dirty fields method?
Fixed in #203