nuxodin / ie11CustomProperties

CSS variables (Custom Properties) polyfill for IE11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polyfill pegs IE11 CPU

mherchel opened this issue · comments

** Description **
I'm evaluating this polyfill for potential inclusion in a Drupal core theme at https://www.drupal.org/project/olivero/issues/3150283

What I'm finding is that the polyfill is pegging the CPU at 100% for far too long.

** Version **
v4.0.1

** To Reproduce **
Live working example with polyfill:
https://polyfill-2-suc1r45wz6rh1vprw9741vkh9ptosyyq.tugboat.qa/

CSS for the site:
https://git.drupalcode.org/project/olivero/-/tree/polyfill-2/css/src

Video of the issue happening:
https://www.youtube.com/watch?v=qW8BlgWtOuA

Thank you form your Feedback.

I have a different version of IE11
grafik

Yours is probably not the version used by current visitors:
grafik

Maybe it makes a difference

Well, I'll wait for Tubgoat...

Fixed the tugboat preview (and updated the issue description). New URL is https://polyfill-2-suc1r45wz6rh1vprw9741vkh9ptosyyq.tugboat.qa/

I'll update IE later today or tomorrow and see if that makes a difference, too

Thx.

Here is a Video from my PC
https://youtu.be/JjnvxkiCscQ

This my CPU
grafik

Definitely better than in your video but it's been going on for quite a while.
139 KB of CSS is just a bit much.
"charCode tokenization" could possibly help:
https://twitter.com/jon_neal/status/1266375550307692547
But that would be a relatively big change...

Is it not a mistake that the same CSS is used 3 times here?

grafik

Yeah, that does look like a mistake. I had to refactor the code down from PostCSS custom properties (which had a log of imports.... I guess I missed some).

I'll remove those duplicate :root declarations, and then update IE in my VM, but it might not be till later tonight or tomorrow.

FYI, I removed the duplicate custom property declaration, and it's still pegging the CPU. Tugboat is rebuilding now.

I downloaded the latest IE update from Microsoft and installed it (and rebooted), but the version number on the about dialog didn't change 🤷‍♂️ Maybe the difference is that you're running in Windows 10 (I'm in Windows 7).

My new Video shows that its better, although not perfect :
https://youtu.be/2FWMXnUJiyk

@jonathantneal made PR with a improvment, maybe its faster in your case now!?
New version 4.1.0

Please reopen if needed, thx.