I am executing several tag fields on my website that include an autocomplete option using the jquery UI plugin. Everything works for me, and although the widget itself is not as reliable as I would prefer (is there a way to make the first element in the list always highlighted, for example), it is now available for maintenance.
My question is processing server requests for autocomplete data. Now I am using AJAX to get possible matches for the input word entered. The table I'm on contains about 10,000 records, and I thought that instead of constantly querying this table, I could just cache the list of these records in a shared / static property on my server (I use ASP.NET MVC with a SQL Server backend, by the way) and request this list instead. I would update the list every 4 hours or so to update it.
The idea, obviously, is to reduce the load on my SQL server and maximize autocomplete performance. I ultimately wonder if it is a bad practice to store a list / array of 10,000 values in memory on my server; is there a limit / threshold here? My server has 2 GB of RAM and may be updated soon.
Any suggestions would be highly appreciated.
Thank you for your time!
source
share