Commit 9bc6ff3
authored
perf: Using search engine to compute the total number of records for user metrics (#5641)
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
Using search engine total instead of DB count to get the total number of
records. This improves the performance when running the Argilla server
on an HF space with persistent storage enabled.
**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->
- Improvement (change adding some improvement to an existing
functionality)
**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->
**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->
- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)1 parent 432f557 commit 9bc6ff3
File tree
3 files changed
+11
-6
lines changed- argilla-server
- src/argilla_server
- api/handlers/v1/datasets
- contexts
- tests/unit/api/handlers/v1
3 files changed
+11
-6
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | 366 | | |
368 | 367 | | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
| 370 | + | |
372 | 371 | | |
373 | 372 | | |
374 | 373 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| 745 | + | |
| 746 | + | |
745 | 747 | | |
746 | 748 | | |
747 | 749 | | |
| |||
772 | 774 | | |
773 | 775 | | |
774 | 776 | | |
| 777 | + | |
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| |||
791 | 794 | | |
792 | 795 | | |
793 | 796 | | |
794 | | - | |
| 797 | + | |
795 | 798 | | |
796 | 799 | | |
797 | 800 | | |
| |||
800 | 803 | | |
801 | 804 | | |
802 | 805 | | |
803 | | - | |
| 806 | + | |
804 | 807 | | |
805 | | - | |
| 808 | + | |
806 | 809 | | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
807 | 813 | | |
808 | 814 | | |
809 | 815 | | |
| |||
0 commit comments