ImageField unnecessarily adds a post init signal handler to the model Description
ImageField unnecessarily adds a post init signal handler to the model Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). While debugging some performance issues in a Django app, I found a codepath where most of the time was being spent on initializing Django models after fetching…
The task
While debugging some performance issues in a Django app, I found a codepath where most of the time was being spent on initializing Django models after fetching from the DB. It turns out that 30% of the time was being spent on evaluating post_init signals because we were using ImageField. However, the post_init signal…
Part of Lego-X/Lego-RL-SWE-Bench-Verified.