mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-27 13:33:09 +02:00
Improve performance
This commit is contained in:
parent
0cfca4a618
commit
c05586b53a
4 changed files with 20 additions and 10 deletions
|
@ -89,9 +89,11 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const timeline = await query.take(ps.limit!).getMany();
|
||||
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
process.nextTick(() => {
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
});
|
||||
|
||||
return await Notes.packMany(timeline, user);
|
||||
});
|
||||
|
|
|
@ -192,9 +192,11 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const timeline = await query.take(ps.limit!).getMany();
|
||||
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
process.nextTick(() => {
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
});
|
||||
|
||||
return await Notes.packMany(timeline, user);
|
||||
});
|
||||
|
|
|
@ -125,9 +125,11 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const timeline = await query.take(ps.limit!).getMany();
|
||||
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
process.nextTick(() => {
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
});
|
||||
|
||||
return await Notes.packMany(timeline, user);
|
||||
});
|
||||
|
|
|
@ -177,7 +177,11 @@ export default define(meta, async (ps, user) => {
|
|||
|
||||
const timeline = await query.take(ps.limit!).getMany();
|
||||
|
||||
activeUsersChart.update(user);
|
||||
process.nextTick(() => {
|
||||
if (user) {
|
||||
activeUsersChart.update(user);
|
||||
}
|
||||
});
|
||||
|
||||
return await Notes.packMany(timeline, user);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue