Avoid reloading the zone after creating an element
Closes #377 (closed)
When creating an element without slim_output, three extra queries were made after creating an element, to retrieve the zone, the image and the image server. Those were caused by the zone_id optimization made for slim_output (!836 (merged)) and causes elements with null zones to be returned with a Postgres cluster.
Benchmarks with manage.py gunicorn and without a cluster:
| Endpoint | master | This branch |
|---|---|---|
| CreateElement | 105ms | 85ms |
| CreateElement with slim_output | 57ms | 58ms |
Edited by Erwan Rouchet