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

Improve performance of auto-suggest user search #5

Closed
danielbachhuber opened this issue Jan 23, 2012 · 5 comments
Closed

Improve performance of auto-suggest user search #5

danielbachhuber opened this issue Jan 23, 2012 · 5 comments

Comments

@danielbachhuber
Copy link
Contributor

Currently, we use and filter get_users() to handle the auto-suggest search. This works fine, but it would be better to improve its performance. We're doing queries every time the AJAX is fired.

One way we might do this is to load all of the users into cache on load and then search through that cached value with PHP instead. This way, we only need to to query once (on the first ajax search) and all other results are returned from the cached values.

@mintindeed
Copy link
Contributor

Somewhat related: we use this on 3 sites, and have about 5-10 authors per site. Some of them complained about the ajax search, they didn't like the UI.

We customized the plugin to output a list of all authors with a checkbox instead of the ajax search, and it was uniformly preferred. They all liked the ability to quickly scan the list and check the appropriate co-author rather than type it.

Part of the problem was the ajax performance, and part of it was typos. For example, I start to type in "dnaiel" instead of "daniel" and I get no results; checkbox by your name == problem eliminated.

@danielbachhuber
Copy link
Contributor Author

Oh, interesting. How did you customize the plugin without hacking the core of the plugin?

On Jan 27, 2012, at 18:52, Gabriel Koenreply@reply.github.com wrote:

Somewhat related: we use this on 3 sites, and have about 5-10 authors per site. Some of them complained about the ajax search, they didn't like the UI.

We customized the plugin to output a list of all authors with a checkbox instead of the ajax search, and it was uniformly preferred. They all liked the ability to quickly scan the list and check the appropriate co-author rather than type it.

Part of the problem was the ajax performance, and part of it was typos. For example, I start to type in "dnaiel" instead of "daniel" and I get no results; checkbox by your name == problem eliminated.


Reply to this email directly or view it on GitHub:
https://github.com/danielbachhuber/Co-Authors-Plus/issues/5#issuecomment-3697754

@mintindeed
Copy link
Contributor

We didn't; we just hacked the plugin. :)

I bring it up because I was surprised it was universally preferred by our authors, over an ajax search. We considered making it a preference and submitting it to the original plugin maintainer, but never got around to it. (Since our userbase is relatively small we can't definitely say it's better / more preferred overall.)

@danielbachhuber
Copy link
Contributor Author

Tsk tsk :)

What I might recommend doing next time is writing a small supplementary
plugin that simply unsets the post meta box added by Co-Authors Plus and
then add your own. If you format your form similarly, you won't even
need to handle processing the data.

This way, you can continue to benefit from updates going forward :)

Gabriel Koen
mailto:reply@reply.github.com
January 27, 2012 8:22 PM
We didn't; we just hacked the plugin. :)

I bring it up because I was surprised it was universally preferred by
our authors, over an ajax search. We considered making it a preference
and submitting it to the original plugin maintainer, but never got
around to it. (Since our userbase is relatively small we can't
definitely say it's better / more preferred overall.)


Reply to this email directly or view it on GitHub:
https://github.com/danielbachhuber/Co-Authors-Plus/issues/5#issuecomment-3698138

@mintindeed
Copy link
Contributor

Touché. At the time, that didn't even occur to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants