We may already have the right type, in which case, don't mess with it.
This speeds up bugdir loading a bit more:
$ time be list > /dev/null
real 0m1.245s
user 0m1.116s
sys 0m0.124s
self._setup_encoding(self.encoding)
self._setup_severities(self.severities)
self._setup_status(self.active_status, self.inactive_status)
- self.vcs = vcs.vcs_by_name(self.vcs_name)
- self._setup_user_id(self.user_id)
+ if self.vcs_name != self.vcs.name:
+ self.vcs = vcs.vcs_by_name(self.vcs_name)
+ self._setup_user_id(self.user_id)
def save_settings(self):
settings = self._get_saved_settings()