chosen search input with 8.200 dropdown result very slow on wordpress

30 Views Asked by At

I have wordpress with a chosen search input with 8.200 dropdown results very slow, Is there any solution? Or perhaps it would be possible to limit on php to 100 the results to be displayed and searched in the search field.

php used to display the field:

<div class="fre-input-field">
                    <label class="fre-field-title" for="project-location"><?php _e('Location (optional)', ET_DOMAIN);?></label>
                    <?php
                        ae_tax_dropdown( 'country' ,array(
                                'attr'            => 'data-chosen-width="100%" data-chosen-disable-search="" data-placeholder="'.__("Choose country", ET_DOMAIN).'"',
                                'class'           => 'fre-chosen-single',
                                'hide_empty'      => false,
                                'hierarchical'    => true ,
                                'id'              => 'country',
                                'orderby'   => 'id',
                                'order'     => 'ASC',
                                'show_option_all' => __("Choose country", ET_DOMAIN)
                            )
                        );
                    ?>
                </div>

thank in advance!

I have tried to clear the cache but it is still just as slow, it takes like 10 seconds to load the results in the dropdown and the users leave the page due to this.

0

There are 0 best solutions below