Skip to content
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

getUniqueElementID_IE slows down a lot IE8/9 #124

Open
jwestbrook opened this issue Apr 22, 2014 · 2 comments
Open

getUniqueElementID_IE slows down a lot IE8/9 #124

jwestbrook opened this issue Apr 22, 2014 · 2 comments

Comments

@jwestbrook
Copy link
Collaborator

previous lighthouse ticket #3574
by Fabien Ménager


We noticed strong performance issues after upgrading from Prototype 1.7 to 1.7.1, and finally found that it was due to the new getUniqueElementID_IE function, which replaces getUniqueElementID by using the IE's uniqueID property.

It looks like a good idea at first sight except when updating an element containing thousands of elements, on which purgeElement is called, which calls stopObserving, etc finally accessing the uniqueID property which seems to be created when accessed, so it's a lot slower than a simple UID++.

Keeping the original code from getUniqueElementID changes nearly everything, by going drom 80s of purge to 1.2s.

I see no regression to do this, but would like to know if anybody noticed this problem before me.

@savetheclocktower
Copy link
Collaborator

This is a tough one. We switched to uniqueId because giving an element an expando property in old IEs had the same performance overhead as adding an attribute to that element, and would (at least in some cases) trigger re-layout of that element. If we do anything about this I'd want to run some benchmarks on each approach.

@PhenX
Copy link

PhenX commented May 7, 2014

Hello, thank you for your feedback, I made changes to this and got pretty good results without sacrifying the feature. If you want so I'll send you my modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants