Side navigation
#8792 closed enhancement (wontfix)
Opened April 06, 2011 08:27PM UTC
Closed July 25, 2011 04:20PM UTC
Last modified March 13, 2012 02:49PM UTC
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
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.
Attachments (0)
Change History (15)
Changed April 07, 2011 08:19PM UTC by comment:1
component: | unfiled → event |
---|---|
milestone: | 1.next → 1.6 |
owner: | → dmethvin |
priority: | undecided → high |
status: | new → assigned |
Changed April 15, 2011 03:31PM UTC by comment:2
milestone: | 1.6 → 1.7 |
---|---|
priority: | high → low |
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.
Changed April 17, 2011 12:47AM UTC by comment:3
milestone: | 1.7 → 1.next |
---|---|
owner: | dmethvin |
status: | assigned → open |
Let's discuss this in the roadmap meeting.
Changed May 22, 2011 07:27PM UTC by comment:4
keywords: | → 1.7-discuss |
---|
Nominating ticket for 1.7 discussion.
Changed May 22, 2011 09:28PM UTC by comment:5
+1,
Changed May 23, 2011 12:37AM UTC by comment:6
-1, I don't see any possible feature test, hence why I'll vote negatively
Changed May 23, 2011 01:02AM UTC by comment:7
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)?
Changed May 23, 2011 01:02AM UTC by comment:8
component: | event → data |
---|
Changed May 23, 2011 04:28AM UTC by comment:9
description: | 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. \ → 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.\ |
---|
+0,
Changed May 24, 2011 09:27PM UTC by comment:10
description: | 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.\ → 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. \ |
---|
-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.
Changed June 03, 2011 01:53PM UTC by comment:11
description: | 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. \ → 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.\ |
---|
+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.
Changed June 03, 2011 04:00PM UTC by comment:12
+1, if we've got a good way to detect and we get a perf boost, why not?
Changed June 05, 2011 09:28PM UTC by comment:13
description: | 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.\ → 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. \ |
---|
+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
Changed July 12, 2011 03:03PM UTC by comment:14
milestone: | 1.next → 1.7 |
---|---|
priority: | low → blocker |
Changed July 25, 2011 04:20PM UTC by comment:15
resolution: | → wontfix |
---|---|
status: | open → closed |
Closing until we remove global events.