nolanlawson / emoji-picker-element

A lightweight emoji picker for the modern web
https://nolanlawson.github.io/emoji-picker-element/
Apache License 2.0
1.47k stars 83 forks source link

fix: avoid calling getRootNode #399

Closed nolanlawson closed 7 months ago

nolanlawson commented 7 months ago

I don't believe this will help with #398, but it can't hurt. I realized that we don't actually need to call getRootNode at all, because the shadowRoot never changes.

github-actions[bot] commented 7 months ago

📊 Tachometer Benchmark Results

Summary

benchmark-total

  • emoji-picker-element-change-tab: unsure 🔍 -2% - +0% (-1.19ms - +0.03ms)
    this-change vs tip-of-tree
  • emoji-picker-element-database-interactions: unsure 🔍 -4% - +7% (-3.92ms - +6.74ms)
    this-change vs tip-of-tree
  • emoji-picker-element-first-load: unsure 🔍 -5% - +4% (-2.41ms - +2.30ms)
    this-change vs tip-of-tree
  • emoji-picker-element-second-load: unsure 🔍 -4% - +9% (-1.55ms - +3.67ms)
    this-change vs tip-of-tree

Results

emoji-picker-element-change-tab
  • Browser: chrome-headless 121.0.6167.160
  • Sample size: 50
  • Built by: Benchmarks #374
  • Commit: 57b1b99
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
49.39ms - 49.99ms-unsure 🔍
-2% - +0%
-1.19ms - +0.03ms
tip-of-tree
tip-of-tree
49.74ms - 50.81msunsure 🔍
-0% - +2%
-0.03ms - +1.19ms
-
emoji-picker-element-database-interactions
  • Browser: chrome-headless 121.0.6167.160
  • Sample size: 50
  • Built by: Benchmarks #374
  • Commit: 57b1b99
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
100.90ms - 108.87ms-unsure 🔍
-4% - +7%
-3.92ms - +6.74ms
tip-of-tree
tip-of-tree
99.94ms - 107.01msunsure 🔍
-6% - +4%
-6.74ms - +3.92ms
-
emoji-picker-element-first-load
  • Browser: chrome-headless 121.0.6167.160
  • Sample size: 50
  • Built by: Benchmarks #374
  • Commit: 57b1b99
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
50.58ms - 53.86ms-unsure 🔍
-5% - +4%
-2.41ms - +2.30ms
tip-of-tree
tip-of-tree
50.59ms - 53.96msunsure 🔍
-4% - +5%
-2.30ms - +2.41ms
-
emoji-picker-element-second-load
  • Browser: chrome-headless 121.0.6167.160
  • Sample size: 70
  • Built by: Benchmarks #374
  • Commit: 57b1b99
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
38.00ms - 42.14ms-unsure 🔍
-4% - +9%
-1.55ms - +3.67ms
tip-of-tree
tip-of-tree
37.42ms - 40.60msunsure 🔍
-9% - +4%
-3.67ms - +1.55ms
-

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] commented 7 months ago

Size Change: -72 B (0%)

Total Size: 36.6 kB

Filename Size Change
./bundle.js 36.6 kB -72 B (0%)

compressed-size-action