#11989 closed bug (fixed)
Investigate fragment cache performance in terms of large html fragments
Reported by: | Rick Waldron | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | manipulation | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Fragment cache benefits only apply to single element creation, which isn't a realistic representation of real world use cases
Change History (9)
comment:1 Changed 11 years ago by
Component: | unfiled → manipulation |
---|---|
Milestone: | None → 1.9 |
Owner: | set to Rick Waldron |
Priority: | undecided → low |
Status: | new → assigned |
Version: | 1.7.2 |
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | Avoid fragment cache in browsers that won't benefit from its use → Investigate fragment cache performance in terms of large html fragments |
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
I suspect that most real jQuery code doesn't benefit from the fragment cache very much anymore. Here is what I came up with, but perhaps I've got something wrong in there: http://jsperf.com/fraggler
It definitely helps in browsers like IE6/7, where there was code like this in a circa-2008 benchmark:
for ( var i=0; i < 10000; i++ ) $("body").append("<p>paragraph</p>");
The paragraph text is fragment-cached so it doesn't have to be re-$.clean
ed each time through the loop. Note that any loop that inserts a lot of *unique* content each time through the loop does not benefit at all from the cache, and in fact is slower/bigger because of it:
for ( var i=0; i < 10000; i++ ) $("body").append("<p>paragraph number "+i+"</p>");
Since the fragment cache doesn't save anything larger than 512 bytes, it doesn't have any effect on large fragments by design. It seems unlikely that someone would be inserting huge identical fragments of HTML anyway.
So I'd be interested in finding real-world cases where performance is badly affected by just pulling all the frag cache stuff out. Seems like oldIE is the most likely casualty there, so if there are such cases perhaps we'll need to yank it in 2.0 and not 1.9.
comment:5 Changed 10 years ago by
Milestone: | 1.9 → 2.0 |
---|---|
Owner: | Rick Waldron deleted |
Status: | assigned → open |
I don't think we should tackle this until 2.0, yanking out the frag cache is probably more disruption than we want to do.
comment:6 Changed 10 years ago by
The decision to remove fragment cache has been made, and since fragment cache will need some addressing with a fix I have for #4087 I volunteered to do the honors.
See: #4087 - http://bugs.jquery.com/ticket/4087 Pull request for #4087 - https://github.com/jquery/jquery/pull/1047#discussion_r2284505
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fix #11989. Remove fragment cache, moving to jquery-compat. Close gh-1052.
Changeset: 13449a99b2b279a7ae6401b8373d20504362213d
comment:9 Changed 10 years ago by
Milestone: | 2.0 → 1.9 |
---|
do some jsPerf tests need to be created to progress on this?