nolanlawson / emoji-picker-element

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

feat: upgrade to svelte v5 #376

Closed nolanlawson closed 8 months ago

nolanlawson commented 10 months ago

It's way too early to do this, but I did want to kick the tires on it at least

github-actions[bot] commented 10 months ago

📊 Tachometer Benchmark Results

Summary

benchmark-total

  • emoji-picker-element-change-tab: unsure 🔍 -1% - +2% (-0.74ms - +1.20ms)
    this-change vs tip-of-tree
  • emoji-picker-element-database-interactions: unsure 🔍 -4% - +7% (-4.59ms - +7.00ms)
    this-change vs tip-of-tree
  • emoji-picker-element-first-load: unsure 🔍 -5% - +7% (-2.44ms - +3.65ms)
    this-change vs tip-of-tree
  • emoji-picker-element-second-load: unsure 🔍 -5% - +2% (-2.24ms - +0.84ms)
    this-change vs tip-of-tree

Results

emoji-picker-element-change-tab
  • Browser: chrome-headless 120.0.6099.71
  • Sample size: 50
  • Built by: Benchmarks #359
  • Commit: e695328
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
54.78ms - 56.34ms-unsure 🔍
-1% - +2%
-0.74ms - +1.20ms
tip-of-tree
tip-of-tree
54.76ms - 55.90msunsure 🔍
-2% - +1%
-1.20ms - +0.74ms
-
emoji-picker-element-database-interactions
  • Browser: chrome-headless 120.0.6099.71
  • Sample size: 50
  • Built by: Benchmarks #359
  • Commit: e695328
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
102.40ms - 111.00ms-unsure 🔍
-4% - +7%
-4.59ms - +7.00ms
tip-of-tree
tip-of-tree
101.61ms - 109.38msunsure 🔍
-7% - +4%
-7.00ms - +4.59ms
-
emoji-picker-element-first-load
  • Browser: chrome-headless 120.0.6099.71
  • Sample size: 50
  • Built by: Benchmarks #359
  • Commit: e695328
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
52.29ms - 56.52ms-unsure 🔍
-5% - +7%
-2.44ms - +3.65ms
tip-of-tree
tip-of-tree
51.61ms - 55.99msunsure 🔍
-7% - +4%
-3.65ms - +2.44ms
-
emoji-picker-element-second-load
  • Browser: chrome-headless 120.0.6099.71
  • Sample size: 50
  • Built by: Benchmarks #359
  • Commit: e695328
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
41.79ms - 43.86ms-unsure 🔍
-5% - +2%
-2.24ms - +0.84ms
tip-of-tree
tip-of-tree
42.38ms - 44.67msunsure 🔍
-2% - +5%
-0.84ms - +2.24ms
-

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] commented 10 months ago

Size Change: +7.34 kB (+17%) ⚠️

Total Size: 50.1 kB

Filename Size Change
./bundle.js 50.1 kB +7.34 kB (+17%) ⚠️

compressed-size-action

nolanlawson commented 10 months ago

I like the idea of snippets, but they don't seem to work yet.

Sadly the bundle size has increased significantly, and the Tachometer tests don't show a significant improvement.

nolanlawson commented 9 months ago

Got snippets working, got the size down to +15% using hacks.

nolanlawson commented 9 months ago

Memory usage baseline:

| Scenario | Bytes             | Relative to blank page |
| -------- | ----------------- | ---------------------- |
| blank    | 380 kB (379592)   | 0 B (0)                |
| picker   | 1.23 MB (1228824) | 849 kB (849232)        |
| compact  | 1.11 MB (1108494) | 729 kB (728902)        |
| full     | 1.38 MB (1379992) | 1 MB (1000400)         |

Memory usage:

| Scenario | Bytes             | Relative to blank page |
| -------- | ----------------- | ---------------------- |
| blank    | 380 kB (379572)   | 0 B (0)                |
| picker   | 1.49 MB (1494441) | 1.11 MB (1114869)      |
| compact  | 1.11 MB (1108494) | 729 kB (728922)        |
| full     | 1.37 MB (1366930) | 987 kB (987358)        |
nolanlawson commented 9 months ago

Hm, sadly Safari 12 support seems broken due to the use of ?. (optional chaining).

Caniuse has Safari 12 usage at around 0.5%, Wikimedia has it at 0.25%.

nolanlawson commented 8 months ago

Updated memory numbers with Chrome 120:

Baseline:

Scenario Bytes Relative to blank page
blank 388 kB (387700) 0 B (0)
picker 1.23 MB (1228916) 841 kB (841216)
compact 1.11 MB (1108494) 721 kB (720794)
full 1.38 MB (1379992) 992 kB (992292)

This PR:

Scenario Bytes Relative to blank page
blank 380 kB (379572) 0 B (0)
picker 1.5 MB (1495097) 1.12 MB (1115525)
compact 1.11 MB (1108494) 729 kB (728922)
full 1.38 MB (1379992) 1 MB (1000420)
nolanlawson commented 8 months ago

See #381, I decided to yolo and switch to a custom framework instead