SLOW loading Data Entry Page

I have a massive data entry page. It is actually something I have been pretty happy with, but it has grown massively. Due to data and input requirements, it has grown to well over 1500 data points. I have three ‘labor types’ so I use a cflayout and 3 tabs to reduce the data set being seen at any given time.

It also has a totals column for each row and column, all handled through javascript and it all works great. The problem is the speed. Specifically, I traced it all down to one line:

<input type="text" name="Civ_#intRowNumber#_#intFY#_#intJobFunction#" 
							value="#myTempFieldValue#"
								size="5" 
									onfocus="select()"
										onChange='sumField("Civ",#intRowNumber#, #intFY#, #intJobFunction#)'<cfif NOT session.stctPerms.blnEdit> disabled</cfif>>

Specifcally, its the onChange. If I remove the ‘onChange’, the page loads almost instantly, and thats a lot of data! At the least, the form still populates with the correct data and row totals.

The issue is, I have that awesome sumField function I dont want to lose. Right now every time a user makes an entry, it auto updates the row and column totals. The actual on screen update is instant as well, but the page is taking a full minute or so to load. It is unacceptable load time.

Is there any way I can make this more efficient? I even took the code out of the sumField function so it was blank (thinking I could optimize my JS), but its almost no time savings. Its just having that onChange function that is chewing up the pages load time!

I really appreciate any help in making this faster, I dont want to lose the functionality.

I don’t use CFLayout so can’t say what onChange would do …

Is it an AJAX call to the server every time they hit a button?

How are you querying all those records? Is it a single call to the database to pull them all in at once or are you looping over multiple queries?

Reducing the number of CF query calls would help a lot, put more work on the database.

Does the data change all the time or is it something that’s updated every once in a while? Could you cache the queries if they don’t change that often, in which case you’re cutting back your calls to the DB and speeding things up that way?