i have a javascript code that huge enough (because so many loop & create new element ). does anyone know how to make a javascript program can run faster? does anyone know/have program that can simplify my javascript program (maybe a program that automatically remove something not important in javascript code like remarks & indentation) so my javascript program's size can be smaller and faster to load from internet?
avoid nested loops, recursive stuff and do your comparisons of arrays on sorted arrays instead of n^2 comps. ie: code better.
Are you collecting info from a form? If so you could maybe try collecting some of the information using a server side script first and then using this information to reduce the amount of javascript that you need to run?
I have noticed that javascript doesn't scale that well. If your arrays start to get pretty big, the client machine wil choke. I also agree with the loops and nesting.