Microsoft IE JavaScript Perf. Tips, Part Trois

In August and November, we highlighted parts one and two of the IE team's JScript performance tips. Peter Gurevich is back for part three:
  1. Avoid Closures if Possible. What happens when [a closure registered as an event listener] never fires? We expect it to, but it might not. If it doesn't fire, the closure [may have] a reference to [a] source object and the source object back to the closure. This is an implicit circular reference, hard to spot, and IE leaks memory. This is never good for performance.
  2. Don’t use Property Accessor Functions. A common technique in object oriented programming is to use property accessor functions... in the form of [get/set]_PropertyName (or many others depending on the style)... [This makes for] terrible JScript.

Microsoft IE JavaScript Perf. Tips, Part Trois

In August and November, we highlighted parts one and two of the IE team's JScript performance tips. Peter Gurevich is back for part three:

  1. Avoid Closures if Possible. What happens when [a closure registered as an event listener] never fires? We expect it to, but it might not. If it doesn't fire, the closure [may have] a reference to [a] source object and the source object back to the closure. This is an implicit circular reference, hard to spot, and IE leaks memory. This is never good for performance.
  2. Don’t use Property Accessor Functions. A common technique in object oriented programming is to use property accessor functions... in the form of [get/set]_PropertyName (or many others depending on the style)... [This makes for] terrible JScript.

January 4th, 2007

Tagged View

Tags Similar

Posts Fresh +

Categories View

Archives View

Zero. Zilch. Nada. None. No commento.

Feel free to leave related comments here!

Rather Leave A Voice Comment?

Feel free to leave voice comments here!

Social Bookmarking