CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 ASP Performance

Print topic Send  topic

Author Message
Andres Rormoser
Posted: 02/22/2008, 4:09 AM

I have a performance issue in several of my pages. I use IIS 6, ASP and SQL Server 2000.

If a create a new ASP page with Codecharge 3.1.0.2 with one single listbox that reads 5000
records from one table the ASP takes 5 seconds loading. If a create a similar page without
codecharge with a single listbox with 5000 records and read the data and store it in a
variable and at the end of the recordset loop a do the Response.Write i have the same
performance results. (5/6 seconds)

But if I made the Response.Write inside the loop the page took 0.2 seconds loading.

Is there any way to solve this issue? Make Codecharge Write inside the loop instead of
loading of the components in memory and then do the Response.Write? Any IIS configuration
changes to make the page faster?

Page1 (CCS Style) takes 5 seconds
Set rs = Conn.Execute(SQL)
html = "<select id='test'>"
While Not rs.EOF
html = html + "<option value=""" + CStr(rs("id")) + """>" + CStr(rs("field1")) +
"</option>"
rs.MoveNext
Wend
html = html + "</select>"
Response.Write(html)
Response.end

Page2 takes 0.2 seconds
SQL = "SELECT TOP 5000 field1 from table"
Set rs = Conn.Execute(SQL)
Response.Write("<select id='test'>")
While Not rs.EOF
Response.Write("<option value=""" + CStr(rs("id")) + """>" + CStr(rs("field1")) +
"</option>")
rs.MoveNext
Wend
Response.Write("</select>")
Response.end

Thanks, Andres Rormoser

Edd


Posts: 547
Posted: 02/23/2008, 4:54 PM

Andres,
String concatenation (which CCS by default uses) is very slow in ASP.

If you use response.write method is direct writing to the screen (by far the fastest method) but since ccs uses a HTML parsing technique it will never work for CCS.

Try the result from PeterR's last post on this subject
ASP is very slow with assembling large strings required to build a listbox, but for larger amount of data   
you can speed up the listbox by placing such code the in "Before Show" event of the ListBox:  
Formname.Listboxname.PopulatingType = ccsJoins  
(Formname and Listboxname need to be replaced with your own values)  
  
This method is little slower with lesser number of values, but should work in your case,   
if you still want your users to select from such a large number of values.  

Please post your speed results as I am curious to know the timimgs.

Good luck
Edd

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.