Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : Refresh List box using javascript Signup · Login
Author Thread
Refresh List box using javascript
Posted in tutorial: Fastest way of Database Access : Caching Records in Memory
·  mhprasad75
User
Joined: 15 Nov 2002
Total Posts: 5
Refresh List box using javascript
Posted: 9 Dec 2002
Hi Faisal
I am working on a script where I have to refresh a list box with 10000 items on client side using javascript. The functions works and fills the list box with 10000 items. But the problem is it takes a lot of time approx. 10 minutes to refresh the list with 10000 items and CPU usage goes to 100%.
I would be greatful to you if you could suggest me on reducing the refreshing time and why CPU usage goes to 100%.

Best Regards,
Prasad
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 547
Re: Refresh List box using javascript
Posted: 12 Dec 2002
Prasad,

No matter how fast your application, if it's not well architected then it won't perform well.

Refreshing a list of 10,000 items from the database is a bad design choice. Although you can cache the list ( *you should* ) in memory, it still will take lot of space.

Your preference should be to reduce the number of items displayed in the list box to the minimum required e.g. 100 makes sense. Next you should cache the records in memory ( if they don't change that often ) using an Application level variable and display the cached records instead of hitting database every time.

P.S. CPU usage will hit 100% mark everytime you carry out a CPU intensive operation. Taking 10 minutes suggests that you should reconsider your design options or you risk crashing your entire server.

Faisal Khan.
Stardeveloper.com

Users Who Have Visited This Thread In Last 24 Hours
3 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.