Small optimizations #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "kennethnym-main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
hi, you didn't use astro or even vite, so i eliminated the waterfalls manually, for it to load instantly (as it should)
mostly just by preloading
perf:
<audio>
tags for the audio files:new Audio()
kept making random extra requests to the resources even if i preloaded them so it's gonestyle:
before-after
stats


waterfall


tbh these are not that significant since the app is small. but note that:
also, you might want to use mp3 or webm for the audio files, wav is huge.
ty kenn cool project
thank you so much for your pr!!! the changes work well locally on my machine, but i just have questions about some of the changes.
i think
5rem
is not wide enough, as right now the "pause" label is overflowing by a little bit:as you can see, the label is not perfectly centered. i think a longer button should mitigate this issue.
also the screenshot above shows that the backdrop of the button is 1px off to the right. for comparison, this is how it looks like in prod:
would u mind elaborating why this fixed width is needed? it's not immediately obvious to me, so i must have missed sth.
sorry, it's just that when the text changes from 4 chars (play) to 5 (pause), the button like "jumps" as the width is different, which imo defeats the physical button effect.
i don't really write css and just eyeballed it, but the fix is to explicitly define a width for the button
fixed my sht, now it's pixel perfect for me!
before:
https://github.com/user-attachments/assets/30b074aa-6069-43b2-9b6b-cfeea6f2f97d
after:
https://github.com/user-attachments/assets/4b656fb7-d744-42a4-83b2-c4eb253fcc6d
LGTM! i will make a slight modification on button:active translate, as now it doesn't move when i click it, i will revert the value back to 4px (the fact that the button moves 1px further is intentional - it makes the click more satisfying!)