rubengc/cmb2-field-ajax-search

Ajax_term_search vs massive callback lists

Opened this issue · 0 comments

First off, many thanks for this tool. It's been huge in my development of a current project.

Question for you about using the fields ajax_search_terms vs creating a custom field type to use an ajaxed powered option_cb to pull in a large options list with 1,100 - 3,000 option's for a select field.

I.e. not using terms, posts, or users...

If I have a 1,100 item list, do you think it's smartest to first insert as terms under a custom taxonomy and then use the ajax_term_search for the field?

Or.....

Or, is it smartest (performance wise) to instead create a custom field type with ajax to pull in the list by itself only when the page with the form is rendered?

If I do that, id have their selected data save to the field meta, while also using a hook to automatically save/insert their selection into the custom taxonomy as a new term (if Not already exists). Thus, I wouldnt always have the 1,100 terms - 3,000 in the db and would populate it only as users select options.

.... but is that pointless because of wp term cache???