Re:Show HN: Web component – Keyboard shortcuts interface for...
by purplecats on Saturday October 23, 2021 @05:01AM
(#28966813)
runs slow and is cpu intensive it seems
[ Parent
| on HN ]
Re:Show HN: Web component – Keyboard shortcuts interface for...
by sergei_ws on Saturday October 23, 2021 @06:39AM
(#28967206)
Hey, I will be really glad to know some details.
Can you please provide some info about where did you test it? Thanks in advance.
Because a few people asked me for nextjs demo, so I have created a small one and it's showing 100 Performance on the lighthouse. https://ninja-keys-demo.vercel.app/
Also, it's using backdrop filter for blur effect, that maybe slow, but it's easy to change in css variables
Re:Show HN: Web component – Keyboard shortcuts interface for...
by purplecats on Saturday October 23, 2021 @09:18PM
(#28973998)
i think it was the link from your github sidebar. it might have been the css. each keystroke takes a while to process though.
i use something like this that i built which is not nearly as pretty, but it's really fast so must just be your styling as i can't imagine your algorithms are that computationally intensive.
Re:Show HN: Web component – Keyboard shortcuts interface for...
by sergei_ws on Sunday October 24, 2021 @06:11AM
(#28976473)
got it, really thank you for feedback!
yea, there are no much algorithms, it's only flattern on start (if it's tree structure data) and then just a regex for search.
But I will check and improve performance later, as it's my first try with web components, so maybe I can skip some re-renders. Thanks again!