Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use autocomplete fields in the admincom controlpanel to speed up loading times #597

Open
vegu opened this issue Nov 7, 2019 · 6 comments
Open
Assignees
Milestone

Comments

@vegu
Copy link
Contributor

@vegu vegu commented Nov 7, 2019

This ticket is for the control panel UI used by admincom, not the customer facing UI.

Basically any page in the admin control panel that loads dropdowns with thousands of objects (networks, organizations) in them etc. is currently loading abysmally slow. Switching those dropdowns to autocomplete dropdowns will dramatically increase loading time on those pages.

We already use grappelli which comes with an autocomplete feature out of the box - so setting that up is mostly a matter of going through all the admin views and doing so.

As an added benefit, having those fields be autocomplete fields will also improve usability as dealing with lists of 16000 objects isn't really ideal.

@shane-kerr

This comment has been minimized.

Copy link

@shane-kerr shane-kerr commented Nov 7, 2019

+1 having a dropdown with more than a dozen element or so usually ends up with me typing the first letter of the choice I want anyway (for example selecting a country).

@mcmanuss8

This comment has been minimized.

Copy link
Contributor

@mcmanuss8 mcmanuss8 commented Nov 7, 2019

@vegu I think it depends on the cause of the slowness. Is it getting all the possible values from the server and passing them to the client? Or does getting the full list happen quickly, and the client finding the correct value in the dropdown is the slow part?

If it's the former, I think we would want a type ahead that pushes the search term and the server returns a subset of the objects that match the search string (case insensitively, anywhere in the name).
If it's the latter, slapping Chosen or Select2 on top will probably suffice.

Either way +1 we should do something here - the # of possible values has got to be way too big to select by scrolling through a dropdown.

@vegu

This comment has been minimized.

Copy link
Contributor Author

@vegu vegu commented Nov 7, 2019

@mcmanuss8 I meant the former, so actual page load time - basically any relationship <select> gets filled with all possible entries. So for types that have a lot of objects (such as network or organization) each individual dropdown on a page currently significantly impacts loading time.

As i mentioned we already have grappelli installed which is an enhancement add-on that aims to improve the default django admin UI. It comes with an autocomplete feature that can be turned on for such fields and which behaves as you described in your suggestion.

@mcmanuss8

This comment has been minimized.

Copy link
Contributor

@mcmanuss8 mcmanuss8 commented Nov 7, 2019

Great, just wanted to make sure we understood the bottleneck :)

@arnoldnipper arnoldnipper self-assigned this Nov 7, 2019
@arnoldnipper

This comment has been minimized.

Copy link
Contributor

@arnoldnipper arnoldnipper commented Nov 7, 2019

+1 ... that would be a big help for AC

@koalafil , please go ahead. @shane-kerr @mcmanuss8 and @arnoldnipper support this issue

@grizz

This comment has been minimized.

Copy link
Member

@grizz grizz commented Nov 7, 2019

+1 -- Not that we need a 4th :)

@arnoldnipper arnoldnipper added this to the Decide milestone Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.