perf(server): Improver performance

This commit is contained in:
syuilo 2021-03-19 18:22:34 +09:00
parent fbc9d5ecba
commit 5e61c60f85
2 changed files with 4 additions and 2 deletions

View File

@ -32,4 +32,4 @@ setInterval(() => {
fetchMeta(true).then(meta => {
cache = meta;
});
}, 5000);
}, 1000 * 10);

View File

@ -85,7 +85,9 @@ export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Notifications.createQueryBuilder('notification'), ps.sinceId, ps.untilId)
.andWhere(`notification.notifieeId = :meId`, { meId: user.id })
.leftJoinAndSelect('notification.notifier', 'notifier');
.leftJoinAndSelect('notification.notifier', 'notifier')
.leftJoinAndSelect('notification.note', 'note')
.leftJoinAndSelect('note.user', 'user');
query.andWhere(`notification.notifierId NOT IN (${ mutingQuery.getQuery() })`);
query.setParameters(mutingQuery.getParameters());