Improve performance

This commit is contained in:
syuilo 2019-04-27 11:17:03 +09:00
parent 0cfca4a618
commit c05586b53a
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
4 changed files with 20 additions and 10 deletions

View file

@ -89,9 +89,11 @@ export default define(meta, async (ps, user) => {
const timeline = await query.take(ps.limit!).getMany();
process.nextTick(() => {
if (user) {
activeUsersChart.update(user);
}
});
return await Notes.packMany(timeline, user);
});

View file

@ -192,9 +192,11 @@ export default define(meta, async (ps, user) => {
const timeline = await query.take(ps.limit!).getMany();
process.nextTick(() => {
if (user) {
activeUsersChart.update(user);
}
});
return await Notes.packMany(timeline, user);
});

View file

@ -125,9 +125,11 @@ export default define(meta, async (ps, user) => {
const timeline = await query.take(ps.limit!).getMany();
process.nextTick(() => {
if (user) {
activeUsersChart.update(user);
}
});
return await Notes.packMany(timeline, user);
});

View file

@ -177,7 +177,11 @@ export default define(meta, async (ps, user) => {
const timeline = await query.take(ps.limit!).getMany();
process.nextTick(() => {
if (user) {
activeUsersChart.update(user);
}
});
return await Notes.packMany(timeline, user);
});