I've developed a Shoutbox extension and would like to implement a feature, by which you can tag a user in a shout (same concept as tagging a user on JSE) using the
@ symbol and then the user's name.
However I'm not sure which approach to go with.
Get all usernames from the
#__users table on page load and return maybe a json object. Then populate a container with names from the json object that match your query.
You start typing a name (@Lod) which then initiates an Ajax request to query the
Option 1 could be a bit heavy if the
#__users table is extremely big, however the matching would be much quicker and vise versa for Option 2.
Which approach (other suggestions welcome) would be the best to go with?