-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Manipulation: Switch rnoInnerhtml to a version more performant in IE #2568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We need you to sign our CLA before accepting a PR. |
|
done |
|
Did you invoke Otherwise, the code looks good. |
|
I don't have node installed. I have updated the commit message as requested. |
|
The rest of the commit message looks good. |
src/manipulation.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, i wonder, do we have similar regexps? Would be helpful to have a comment, which would point to the microsoft tracker issue and perf suite
IE versions greater than 9 do not handle the old regular expression well with large html content This is due to the use of a non-capturing group after a very common html character (<). Test suite: http://jsfiddle.net/Lwa0t5rp/3/ Microsoft bug: https://connect.microsoft.com/IE/feedback/details/1736512/regular-expressions-are-slower-in-edge-than-in-ie8 Fixes gh-2563 Closes gh-2568
|
I have added additional detail to the commit message. Similar regular expressions exist but I didn't find one that will be used on large strings that might have the same kind of impact. |
Could you add it beside the regexp itself? Otherwise we might forget that it is slow in Edge and remove it sometime in the future. |
@SeanHenderson For reference, it should look something like that: // Support: IE 10-11, Edge 10240+
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
rnoInnerhtml = /<script|<style|<link/i,
I'm not sure about that. The above Maybe there are others? |
IE versions greater than 9 do not handle the old regular expression well with large html content This is due to the use of a non-capturing group after a very common html character (<). Test suite: http://jsfiddle.net/Lwa0t5rp/3/ Microsoft bug: https://connect.microsoft.com/IE/feedback/details/1736512/regular-expressions-are-slower-in-edge-than-in-ie8 Fixes jquerygh-2563 Closes jquerygh-2568
|
Sigh, I work with TFS still getting used to GIT. I have created a new branch and a new pull request so I am closing off this one. |
IE versions greater then 9 do not handle the old regular expression well
with large html content.