Files
@ 6c3bda995a88
Branch filter:
Location: kallithea/kallithea/tests/functional/test_home.py
6c3bda995a88
3.4 KiB
text/x-python
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.