question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance regression using FileField and Django 3.1

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

8reactions
AlbericTrancartcommented, Sep 9, 2021

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?

1reaction
LincolnPuzeycommented, Jul 16, 2022

Fixed in #203

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found