Bug Tracker

Ticket #2743 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Potpourri of small improvements to code size and perfomance

Reported by: flesler Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: core event fx selector ajax changes
Cc: Needs: Review

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

potpourri.diff (22.5 kB) - added by flesler 1 year ago.
possible changes.txt (325 bytes) - added by flesler 1 year ago.
Some more possible changes described

Change History

Changed 1 year ago by flesler

Changed 1 year ago by flesler

Some more possible changes described

Changed 1 year 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.

Changed 1 year ago by joern

Sounds like both variations should be send through the benchmark.

Changed 1 year 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.

Changed 1 year ago by flesler

Added most of these changes at [5357]

Changed 1 year ago by flesler

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.