troubleshooting Question

Autocomplete jQuery VERY slow in Classic ASP page

Avatar of capturetheflag
capturetheflag asked on
JavaScriptASPjQuery
9 Comments3 Solutions1442 ViewsLast Modified:
Hello,

I am trying to get jQuery auto-complete to work in a classic ASP web page.
It is working but is very slow.  I am hitting a DB of about 400k names.
Here is the code for the two files. One is source.asp, the second is insert_personnel.asp
Is there a way to make the query only trigger after 2 or 3 amount of characters have been typed?  I guess this would be in the source.asp?
Thanks for the help.
source.asp
dim xcount : xcount = 0
		
		if not rs4.eof then
		do while not rs4.eof
		
		xcount = xcount + 1
		
		output = "[" 
		output = output & "{""user_id"": """ & rs4("user_id") & """, ""value"": """ & rs4("last_name") & """},"

		rs4.movenext
		loop
		end if
		
		
		
		set cmd = nothing
				
		rs4.close
		set rs4 = nothing
		
		output=Left(output,Len(output)-1)
		output = output & "]"
		
		'response.write output & "<BR>"
		'response.write xcount & "<BR>"
	
		
%>

insert_personnel.asp
<%
dim output, outstr, mystring%>
<%
if not rs3.eof then
	do while not rs3.eof
			theChoices=theChoices&""&rs3("first_name")&""","""
		rs3.movenext
	loop
end if		

'''''cleanup and reformat string
theChoices = Replace(theChoices,""","""",""","")
theChoices = """"&theChoices &""""
'response.write theChoices
%>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros