Commit 3288199
authored
perf(userReports): remove
### 📣 Summary
Improve user report performance by removing the expensive count
calculation from the response.
### 📖 Description
This change removes the `count` field from the user report API response
because calculating the total number of documents is a major bottleneck
on large datasets. The count query requires scanning the entire
collection, significantly slowing down the endpoint. Clients still
receive the paginated results as before, just without the heavy count
operation.count from API response DEV-1354 (#6505)1 parent 97862a0 commit 3288199
File tree
5 files changed
+19
-23
lines changed- jsapp/js/api/models
- kobo/apps/user_reports
- tests
- static/openapi
5 files changed
+19
-23
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
264 | | - | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| |||
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
| 317 | + | |
314 | 318 | | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
318 | | - | |
| 323 | + | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
| |||
332 | 337 | | |
333 | 338 | | |
334 | 339 | | |
335 | | - | |
| 340 | + | |
336 | 341 | | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
340 | | - | |
| 345 | + | |
341 | 346 | | |
342 | 347 | | |
343 | 348 | | |
344 | | - | |
345 | | - | |
346 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
347 | 354 | | |
348 | | - | |
349 | | - | |
| 355 | + | |
| 356 | + | |
350 | 357 | | |
351 | 358 | | |
352 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17712 | 17712 | | |
17713 | 17713 | | |
17714 | 17714 | | |
17715 | | - | |
17716 | 17715 | | |
17717 | 17716 | | |
17718 | 17717 | | |
17719 | | - | |
17720 | | - | |
17721 | | - | |
17722 | | - | |
17723 | 17718 | | |
17724 | 17719 | | |
17725 | 17720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12804 | 12804 | | |
12805 | 12805 | | |
12806 | 12806 | | |
12807 | | - | |
12808 | 12807 | | |
12809 | 12808 | | |
12810 | | - | |
12811 | | - | |
12812 | | - | |
12813 | 12809 | | |
12814 | 12810 | | |
12815 | 12811 | | |
| |||
0 commit comments