logoalt Hacker News

test107204/01/20254 repliesview on HN

Perhaps "eventlistener" word can be extracted, and dynamically called as string to reduce bytes


Replies

chrismorgan04/02/2025

This has been a popular technique at times, but it tends to increase compressed sizes: gzip and similar are better at common string deduplication, having lower overhead. Such shenanigans are also bad for performance, especially in hot paths due to making it harder for the browser to optimise it.

hmmokidk04/01/2025

You joke, but I think about things like this...a lot.