Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2743 closed enhancement (fixed)

Potpourri of small improvements to code size and perfomance

Reported by: flesler Owned by:
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: core event fx selector ajax changes Cc:
Blocked by: Blocking:

Description

Hi, this diff contains a large set of small changes that make the code slightly shorter. Some might make the code faster.

Most are redundant vars, or redundant ifs. Also declared undefined as local var and replaced all null for undefined, this should be slightly faster, and make the code much smaller.

I exposed the speeds hash (slow,fast), so it can modified/extended. I don't remember them all, but their are mostly small changes.

I ran the test suite on IE6 and FF2 and it passed.

Attachments (2)

potpourri.diff (22.5 KB) - added by flesler 12 years ago.
possible changes.txt (325 bytes) - added by flesler 12 years ago.
Some more possible changes described

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by flesler

Attachment: potpourri.diff added

Changed 12 years ago by flesler

Attachment: possible changes.txt added

Some more possible changes described

comment:1 Changed 12 years ago by scott.gonzal

The local undefined variable is faster than the global undefined property, but slower than null. I think keeping the local undefined variable is a good idea, but null should be used where possible.

comment:2 Changed 12 years ago by joern

Sounds like both variations should be send through the benchmark.

comment:3 Changed 12 years ago by flesler

I wasn't really sure about the undefined part, I just added, then you can decide. There're many small changes, you don't need to take them all, some don't even require testing.

comment:4 Changed 12 years ago by flesler

Added most of these changes at [5357]

comment:5 Changed 12 years ago by flesler

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.