#27279: Slow test framework initialization in 1.10.1 compared to 1.10 -------------------------------------+------------------------------------- Reporter: mtomiyoshi | Owner: nobody Type: | Status: new Cleanup/optimization | Component: Migrations | Version: 1.10 Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Marten Kenbeek): Can you try the patch I've attached to the ticket? It may or may not make much of a difference compared to Simon's patch. If it doesn't make a difference, we can at least pinpoint the performance degradation to what happens ''during'' the `RenameModel.state_forwards()` method. For the profile files: could you use the `-o <output_file>` option? That will write all the raw profile data to the file, not just the output to stdout. We can then use the `pstats` module to analyze e.g. the caller/callee graph. > I am not sure if I understood correctly, but I tried setting a breakpoint on that return line and it got called only once (that one call > was made by a RenameModel operation). Is this what you were expecting? With the regular 1.10.1, I would indeed expect this to be called once, when the first `RenameModel` accesses `state.apps`. With Simon's patch I would expect it to be called a few times: once for each migration containing a `RenameModel` operation, and once when rendering the final project state. -- Ticket URL: <https://code.djangoproject.com/ticket/27279#comment:9> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.c7be5431de8a96b15df8f6dd72c7573a%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.