Digital Point Forums
Money Order

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Jun 23rd 2005, 12:31 am
totally beginner totally beginner is offline
Peon
 
Join Date: Jun 2005
Posts: 18
totally beginner is an unknown quantity at this point
Question can javascript run faster?

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?
Reply With Quote
  #2  
Old Jun 23rd 2005, 12:44 am
KingSEO KingSEO is offline
Hand of A'dal
 
Join Date: Feb 2005
Location: In the electronic grid
Posts: 295
KingSEO has a little shameless behaviour in the past
avoid nested loops, recursive stuff and do your comparisons of arrays on sorted arrays instead of n^2 comps.

ie: code better.
Reply With Quote
  #3  
Old Jun 23rd 2005, 7:17 am
dave487 dave487 is offline
Twilight Vanquisher
 
Join Date: Apr 2004
Location: Manchester
Posts: 701
dave487 is on a distinguished road
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?
__________________
SEO SEO John Chow
Reply With Quote
  #4  
Old Jun 23rd 2005, 7:23 am
jorge's Avatar
jorge jorge is offline
Champion of the Naaru
 
Join Date: May 2004
Posts: 203
jorge is on a distinguished road
maybe you can post your code here, we'll see what can be done to improve it
Reply With Quote
  #5  
Old Jun 23rd 2005, 8:45 am
ServerUnion's Avatar
ServerUnion ServerUnion is offline
Starcaller
 
Join Date: Mar 2005
Location: Madison, Wisconsin
Posts: 3,431
ServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud ofServerUnion has much to be proud of
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.
__________________
$$$ WTB: Health related links and blog posts. $$$
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can javascript run faster? totally beginner JavaScript 0 Jun 23rd 2005 12:30 am
Everything Should Be Faster digitalpoint Suggestions & Feedback 16 May 1st 2005 11:50 am
Googld add new pages faster hurricane_sh Google 9 Nov 24th 2004 3:19 am
Isn't it possible Google's PR update just can't go any faster ? Percept Google 18 Sep 17th 2004 12:47 pm


All times are GMT -8. The time now is 2:22 am.