Bug Tracker

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#10814 closed bug (fixed)

make support as lazy as possible with closure in mind

Reported by: timmywil Owned by: m_gol
Priority: high Milestone: 1.11/2.1
Component: support Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

All of the support tests that run at doc ready, and possibly others, can instead be called lazily and then cached on jQuery.support. There are several advantages to this.

  1. It makes page loads faster.
  2. No doc ready needed
  3. No invisible body needed
  4. It is necessary for supporting Closure

Change History (13)

comment:1 Changed 11 years ago by timmywil

Component: unfiledsupport
Milestone: None1.8
Owner: set to timmywil
Priority: undecidedblocker
Status: newassigned

comment:2 Changed 11 years ago by [email protected]

Do you imagine this would fix this bug I just reported? http://bugs.jquery.com/ticket/11082? I was calling jQuery.is(':visible') right after loading jQuery. The function started performing slowly, as it thought $.support.reliableHiddenOffsets was false; actually, the variable was undefined, as it hadn't been initialised at doc ready yet.

So, with a lazy solution, I imagine the first call to jQuery.is(':visible') would trigger the feature detect to set $.support.reliableHiddenOffsets?

comment:3 Changed 11 years ago by mikesherov

Owner: changed from timmywil to mikesherov

comment:4 Changed 11 years ago by mikesherov

Milestone: 1.81.next
Priority: blockerhigh

comment:5 Changed 10 years ago by mikesherov

Owner: mikesherov deleted
Status: assignedopen

comment:6 Changed 10 years ago by dmethvin

It looks to me like there won't be much left of support.js once we've moved to 2.0, but I'll keep this open until our round of refactoring there.

comment:7 Changed 10 years ago by dmethvin

Milestone: 1.next2.0
Resolution: fixed
Status: openclosed

This is essentially done in 2.0; we can always improve it as we see opportunities.

comment:8 Changed 10 years ago by m_gol

Milestone: 2.0
Resolution: fixed
Status: closedreopened

comment:9 Changed 10 years ago by m_gol

Milestone: 2.next
Owner: set to m_gol
Status: reopenedassigned

I'm taking it over. I'll get to it as soon as timmywil's AMD branch is merged.

comment:10 Changed 10 years ago by dmethvin

Blocking: 14164 added

comment:11 Changed 10 years ago by Michał Gołębiowski

Resolution: fixed
Status: assignedclosed

Fix #10814. Make support tests lazy and broken out to components.

Changeset: bbbdd947256a3fcd788fb9d4f306046082a1ef1f

comment:12 Changed 10 years ago by dmethvin

Blocking: 14164 removed

(In #14164) It's blocked by an open ticket, but it is probably better to handle the others on a case-by-case basis rather than a meta-ticket.

comment:13 Changed 10 years ago by dmethvin

Milestone: 2.next1.11/2.1
Note: See TracTickets for help on using tickets.