Changeset - 6c3bda995a88
default
0
5
0
js: use ajax requests for select2 autocomplete
When you have a big user base, with thousends of users, always using the whole
dataset makes the UI slow.
This will replace kallithea/model/repo.py get_users_js and get_user_groups_js
which were used to inline the full list of users and groups in the document.
Instead, it will expose a json service for doing the completion.
When using the autocomplete, there might be multiple ajax requests, but tests
with a userbase > 9000 showed no problems.
And keep in mind, that although we now make multiple requests (one for every
character) that
- the autocomplete is not used that often
- the requests are quite cheap
- most importanly, we no longer need to calculate the user list/group list if
the user doesn't use the autocomplete
Users and groups are still passed as parameters to the javascript functions -
they will be removed later.
When you have a big user base, with thousends of users, always using the whole
dataset makes the UI slow.
This will replace kallithea/model/repo.py get_users_js and get_user_groups_js
which were used to inline the full list of users and groups in the document.
Instead, it will expose a json service for doing the completion.
When using the autocomplete, there might be multiple ajax requests, but tests
with a userbase > 9000 showed no problems.
And keep in mind, that although we now make multiple requests (one for every
character) that
- the autocomplete is not used that often
- the requests are quite cheap
- most importanly, we no longer need to calculate the user list/group list if
the user doesn't use the autocomplete
Users and groups are still passed as parameters to the javascript functions -
they will be removed later.
5 files changed with 150 insertions and 33 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)