]> git.aero2k.de Git - sirius.git/commitdiff
Add note that 'friends_printers' is suboptimal and won't scale.
authorTom Hunger <tehunger@gmail.com>
Tue, 10 Mar 2015 10:48:48 +0000 (10:48 +0000)
committerTom Hunger <tehunger@gmail.com>
Tue, 10 Mar 2015 10:48:48 +0000 (10:48 +0000)
sirius/models/user.py

index 1cd9f161fd93cd2ad838bad0b4d535a1cd438876..7e8140e468d8b67e828d7aaaf9115156eec5ebdc 100644 (file)
@@ -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()