This link has been bookmarked by 66 people . It was first bookmarked on 28 Jul 2006, by Bernardo Schepop.
-
06 Jun 17
-
10 Aug 12
-
16 Jul 10
-
05 May 10
-
15 Mar 10
-
26 Sep 09
Ricardo SatoOpera has one of the fastest and most efficient JavaScript engines of any browser, but when you have multiple User JavaScripts installed, it is important that they run efficiently to keep Opera's performance as high as possible. Well written code will hel
-
27 Aug 09
-
26 Aug 09
-
22 Aug 09
-
17 Feb 09
-
getElementsByTagName returns a dynamic object, not a static array. Every time the loop condition is checked, Opera has to reassess the object, and work out how many elements it references, in order to work out the length property. This takes a little more time than checking against a static number
-
stringObject.indexOf is faster than stringObject.match
-
You should avoid matching against very long strings (10KB+) unless you absolutely have to. If you are certain that the match will only occur in a specific portion of the string, take a substring, and compare against that, instead of the entire string
-
the two regular expressions are treated separately, and will cause the browser to waste resources creating two separate expressions that contain the same value
-
They effectively require the browser to create an entirely new scripting environment (just like creating a new web page), import all variables from the current scope, execute the script, collect the garbage, and export the variables back into the original environment. Additionally, the code cannot be cached for optimisation purposes. eval and its relatives should be avoided if at all possible.
-
Adding an event listener for the 'BeforeEvent' event is the most wasteful of all, since it causes all possible events to fire, even if they are not needed.
-
Each one requires an additional thread to be created for each timeout, and when browsers try to run several timeout threads simultaneously, they slow down
-
Every time you add an element to the document, the browser has to reflow the page to work out how everything has to be positioned and rendered. The more things you add, the more it has to reflow.
-
If you are adding a new element that will have several children, instead of adding it to the document and then attaching its children to it, you should attach its children to it first, and then add it to the document.
-
-
08 Jun 07
-
getElementsByTagName returns a dynamic object, not a static array. Every time the loop condition is checked, Opera has to reassess the object, and work out how many elements it references, in order to work out the length property. This takes a little more time than checking against a static number
-
stringObject.indexOf is faster than stringObject.match
-
You should avoid matching against very long strings (10KB+) unless you absolutely have to. If you are certain that the match will only occur in a specific portion of the string, take a substring, and compare against that, instead of the entire string
-
the two regular expressions are treated separately, and will cause the browser to waste resources creating two separate expressions that contain the same value
-
They effectively require the browser to create an entirely new scripting environment (just like creating a new web page), import all variables from the current scope, execute the script, collect the garbage, and export the variables back into the original environment. Additionally, the code cannot be cached for optimisation purposes. eval and its relatives should be avoided if at all possible.
-
Adding an event listener for the 'BeforeEvent' event is the most wasteful of all, since it causes all possible events to fire, even if they are not needed.
-
Each one requires an additional thread to be created for each timeout, and when browsers try to run several timeout threads simultaneously, they slow down
-
Every time you add an element to the document, the browser has to reflow the page to work out how everything has to be positioned and rendered. The more things you add, the more it has to reflow.
-
If you are adding a new element that will have several children, instead of adding it to the document and then attaching its children to it, you should attach its children to it first, and then add it to the document.
-
-
05 Jan 07
-
13 Dec 06
-
07 Nov 06
-
07 Sep 06
-
13 Aug 06
-
02 Aug 06
-
28 Jul 06
-
24 Jan 06
-
14 Nov 05
-
13 Nov 05
-
05 Sep 05
-
24 Jul 05
-
21 Jul 05
-
12 Jul 05
-
07 Jul 05
-
26 Jun 05
-
24 Jun 05
-
23 Jun 05
-
22 Jun 05
-
21 Jun 05
-
20 Jun 05
-
19 Jun 05
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.