Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting performance issues with this

Status
Not open for further replies.

onressy

Programmer
Mar 7, 2006
421
CA
Hi, i have a couple JS functions that seems to be hindering performance, this is one of them, any suggestion on what i can do to speed it up? Thanks

Code:
	function selectInv(oCell){
		if(mouseStatus == "down"){
			if(selectedRow == oCell.parentElement.id){
				if(oCell.className == "invCellAvl"){
					oCell.className = "invCellAvlSelected";
					if(selectedCells == ""){
						selectedCells = oCell.id;
					} else {
						selectedCells = selectedCells + "~" + oCell.id;
					}
				}
			}
		}
	}
 
That function looks to me like it's about as optimized as it can get for speed.

Lee
 
doesn't seem to bad in and of itself. are you looping, calling this function several times? do you have a real-world example (read: link) so we can see the performance problems?



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
He has posts about the same kind of thing in the HTML and ASP forums, too, specifically about issues related to each forum.

Lee
 
Hi, and yes i'm crazy

I do call the function during a record set loop, for some reason if dumb down the function selectInv to the basics, performance is increased, i'm taking about 10,000+ concurrent users. Does anyone see a method to eliminating or making less or more effecient if statments, as i think the if nesting is degrading?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top