-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Huge performance issues! #148
Comments
Thanks for such a thorough look. We’ll definitely be looking into this. cc @zackbloom |
Sadly this isn't uncommon when there are developers lacking sufficient knowledge in browsers and performance. yes, Tether is awesome and I love it, and been using it for a long time, but.. the code is an absolute horrible mess :( A quick solution would be using fastDOM everywhere in the code (this is have huge benefits, but is a very tedious thing to incorporate since there are tons of lines of code which touch the DOM without apparent order), |
First of all I think it would be nice to cache the scrollbar size I guess this would also work for the position detection: cache the |
@baptistebriel I would welcome a PR to make Tether more efficient. Can the result of |
Hello,
I've been working with
tether
andtether-select
, and decided to made a quick performance test using Chrome's timeline tab..Looks like there's a lot of painful operations going on; I made a test with ~ 20 custom
<select>
within the page, and every frames takes ~ 65ms to render. This is way too huge!Every frame should be ~ 16ms.
We can see here that for every
<select>
element on the page, the functions are being called:position
cache
getScrollBarSize
Theses functions cost a lot because of;
position
(line 1003):getScrollBarSize
(line 172):Kinda related to this issue from
tether-select
: HubSpot/select#43I really think this has to be fixed. Just to be sure, I do not have any other
onscroll
events; everything on the screenshots come fromtether.js
.The text was updated successfully, but these errors were encountered: