From: Tom Hunger Date: Tue, 10 Mar 2015 10:48:48 +0000 (+0000) Subject: Add note that 'friends_printers' is suboptimal and won't scale. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=92aa0f99c3d6cdbff06202e524adc117e3502baf;p=sirius.git Add note that 'friends_printers' is suboptimal and won't scale. --- diff --git a/sirius/models/user.py b/sirius/models/user.py index 1cd9f16..7e8140e 100644 --- a/sirius/models/user.py +++ b/sirius/models/user.py @@ -107,6 +107,8 @@ class User(db.Model): """ :returns: List of printers this user can print on. """ + # TODO(tom): Querying the full database is O(N) and will not + # scale. Replace the model with a N:M relationship. sn = self.twitter_oauth.screen_name reverse_friend_ids = [ x.user_id for x in TwitterOAuth.query.all()