| 1 | Using Psyco with Django is fundamentally problematic and requires thorough testing for the following warning listed in |
| 2 | http://psyco.sourceforge.net/psycoguide/bugs.html#bugs: |
| 3 | * Built-ins are assumed never to change. Global variables can change, of course, but you must not add or remove a global variable to shadow or expose a built-in (at least not after a module is initialized). |
| 4 | * Do not dynamically change the methods of the new-style classes (classes that inherit from a built-in type). |
| 5 | * Psyco assumes that types never change. This is basically wrong (you can assign to `__class__`). This might cause Psyco to randomly believe that instances are still of their previous type. |
| 6 | |
| 7 | However, Django uses metaprogramming and dynamic class changing throughout the code. |
| 8 | |
| 9 | Somebody should volunteer to test a reasonably complex Django application under Psyco, the testing roadmap should be as follows: |
| 10 | * thoroughly test correct behaviour |
| 11 | * compare performance with and withough Psyco |
| 12 | * compare memory usage with and without Psyco |
| 13 | |