marbindrakon/eve-wspace — pull request #47 by joshuablake (2013-06-20 15:28:58+00:00)
Title: System Tooltip Optimisation

Reduces number of DB queries made in the system_tooltips view (in my test map of 10 systems reduction from ~90 to ~60 queries).
Two strategies to achieve this:

- Use select_related() for the region and parent wormhole (this required changing `Wormhole.bottom` to a OneToOneField (related_name is also now singular to reflect this.
- Have `Map.get_spec()` return self.ksystem or self.wsystem rather than making a DB call. This is cached for the request rather than each get_spec() call requiring a further query