diff --git a/files/routes/front.py b/files/routes/front.py index 91fbc264f..be89770d8 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -32,6 +32,8 @@ def notifications(v): notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(26).all() comments = [] + + t = time.time() notifs = [] for index, x in enumerate(notifications): @@ -44,6 +46,7 @@ def notifications(v): g.db.bulk_update_mappings(Notification, notifs) g.db.commit() + print(time.time() - t) next_exists = (len(comments) > 25) listing = comments[:25]