From 835cde6d3d5730f5cd5743d12e88390b127a23b3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 17 Sep 2021 10:00:58 +0200 Subject: [PATCH] fd --- files/routes/front.py | 3 +++ 1 file changed, 3 insertions(+) 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]