This is a migrated thread and some comments may be shown as answers.

Optimizing the Auto Complete speed

6 Answers 42 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 31 Jan 2019, 05:17 PM

I have two auto completes working on the main page of this application.  One on the header and one that appears when the user resizes the browser down to a smaller screen width/

Both use the same controller ajax action.  It seems the first time the user types in the values it take about 5 seconds to render matches.  And subsequent searches are instant.  

Is there a way to optimize that so that that first search is instant?  Please note that the dataset is large.  Over 10,000 products.  But that data is cached in .NET Core at application startup so it is not hitting the database again on each search or a web service, rather reading from the same cached list.  And that list is optimized to contain only two fields, the product name and primary key.

Is there a way to pre-read the data for the list to make it faster?

 

Thanks

6 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 05 Feb 2019, 11:08 AM
Hi Reid,

You could take a look at the following online demo with Virtualization and ServerFiltering for the AutoComplete, which is suitable for large data sets:
Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 05 Feb 2019, 02:16 PM

Hi Konstantin,

I was not able to get this working with that link.    Where does the ValueMapper JavaScript URL come from?  In the demo it is not declared in the controller.

0
Chris
Top achievements
Rank 1
answered on 07 Feb 2019, 06:29 PM
That's what support does.  All the demos are missing code.  You can't get them working without spending a lot of time.  And, support never answers your questions.  If there was complete code, it would be easy, but no.
0
Konstantin Dikov
Telerik team
answered on 08 Feb 2019, 11:37 AM
Hi Chris,

You are correct that the ValueMapper code is not present in the demo. The code could be found in our public repository with the services used in our online demos:
Nevertheless, as documented in the following help topic, the "valueMapper" is not needed from version R3 2016: 
 

Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Chris
Top achievements
Rank 1
answered on 08 Feb 2019, 06:09 PM

Thanks for the reply.  But, that still doesn't help.  I could only get auto complete working with server filtering, which works fine, and I'm assuming with a relatively small data set being returned (< 100 records), that virtualization may not be needed?  But, according to the docs, you need a pagesize for virtualization, but couldn't set that in the data source config, or anywhere else in the config:

 .DataSource(source =>
                                {
                                    source.Read(read =>
                                    {
                                        read.Action("GetUsers", "Admin")
                                        .Data("onAdditionalData");
                                    })
                                    .ServerFiltering(true);
                                })

Plus, as per my previous posts, there's no where to insert the request verification token, to pass back to the controller as it is posting data.  It's better to just post a complete working example of virtualization, as there's no need for us to spend time on minor details like setting up value mapper, and finding out how to pass back a token.  

 

 

0
Konstantin Dikov
Telerik team
answered on 13 Feb 2019, 11:11 AM
Hi Chris,

The PageSize could be set to a Custom DataSource, as demonstrated in our online demo:
As for a working example, you could test this in our offline demos shipped with the product:
On a side note, for all sides convenience, please try to avoid using multiple threads with the same question. Thank you for your understanding.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AutoComplete
Asked by
Reid
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Reid
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Share this question
or