Delay instantiation of User and Spawner objects

Avoids instantiating too many objects before they are used

- deletes Spawner instances after they stop to avoid lingering instances
- use user_dict cache more often instead of db queries
- check for empty spawners dict to avoid a few Spawner instantiations
This commit is contained in:
Min RK
2018-02-05 14:15:07 +01:00
parent 0315dd5612
commit 06fb94b4ea
6 changed files with 65 additions and 34 deletions

View File

@@ -258,7 +258,6 @@ class BaseHandler(RequestHandler):
self.db.add(u)
self.db.commit()
user = self._user_from_orm(u)
self.authenticator.add_user(user)
return user
def clear_login_cookie(self, name=None):