#8792 closed enhancement (wontfix)
Attach data objects directly to DOM elements
Reported by: | dmethvin | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7 |
Component: | data | Version: | 1.5.2 |
Keywords: | 1.7-discuss | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
Only IE6 and IE7 are unable to garbage-collect JavaScript objects, I think the other browsers can handle cleanup themselves.
Switch to direct attach for those cases. This means we don't need to clean up data and events when elements are removed from the DOM, should be a perf boost.
This will require a change to global events since there will jQuery.cache will no longer contain all data for all objects and jQuery.event.trigger can't sneak a peek into the cache to trigger them.
Need a feature detect I can use to determine whether it's safe to attach data to a DOM object.
Change History (15)
comment:1 Changed 12 years ago by
Component: | unfiled → event |
---|---|
Milestone: | 1.next → 1.6 |
Owner: | set to dmethvin |
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Milestone: | 1.6 → 1.7 |
---|---|
Priority: | high → low |
comment:3 Changed 12 years ago by
Milestone: | 1.7 → 1.next |
---|---|
Owner: | dmethvin deleted |
Status: | assigned → open |
Let's discuss this in the roadmap meeting.
comment:7 Changed 12 years ago by
-1, I don't see any possible feature test, hence why I'll vote negatively
comment:8 Changed 12 years ago by
I might be way off here but if we know that UAs that support deleting expandos are safe, then could we assume jQuery.support.deleteExpando is safe way to determine which browser to use internal cache (false) or attach directly (true)?
comment:9 Changed 12 years ago by
Component: | event → data |
---|
comment:11 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, Based on my previous exploration, I don't think this will have a payback until we eliminate global events and possibly until IE6/7 die.
comment:12 Changed 12 years ago by
Description: | modified (diff) |
---|
+1, I think this is fine to push for - global events can be tracked/handled separately (easily, even). And we can use deleteExpando to feature test it. I'm for it.
comment:13 Changed 12 years ago by
+1, if we've got a good way to detect and we get a perf boost, why not?
comment:14 Changed 12 years ago by
Description: | modified (diff) |
---|
+0, This was Dave's idea, and he seems to have done the exploration proving that it seems unviable - but if we're willing to make the resulting architecture changes required, then it seems workable
comment:15 Changed 12 years ago by
Milestone: | 1.next → 1.7 |
---|---|
Priority: | low → blocker |
comment:16 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | open → closed |
Closing until we remove global events.
Deferred for discussion in 1.7; due to the remaining cases that need to be handled (i.e., removing special events and triggering global events) it may not offer enough benefits to be worthwhile.