inbn / component-gallery

The Component Gallery is a collection of components from the best Design Systems. Built with Gatsby and Airtable.
https://component.gallery
MIT License
165 stars 10 forks source link

Page design-systems/ causes high CPU load #68

Open rebootl opened 12 hours ago

rebootl commented 12 hours ago

Hello, I love the collection.

But somehow the page https://component.gallery/design-systems/ causes a high CPU load on my system.

It happens in firefox and chromium similarly. I'm using arch Linux with wayland but I don't think this is related.

I used the firefox profiler but I'm honestly not sure on how to read this.

Screenshot From 2024-11-22 14-16-12

One thing I can see there is that the memory usage keeps going up. Which seems like it shouldn't happen. Also when I disable Javascript the problem does not happen at all.

Best

inbn commented 11 hours ago

Hi, thanks for reporting the issue.

I know this page has many thousands of DOM elements and the site's using react, which would together contribute to high resource usage but that screenshot definitely seems abnormal. I'm seeing 100% CPU usage but normal-looking memory usage on chrome on my Mac. I'll have a look into what could be causing this – I suspect a bunch of unnecessary re-renders.

P.S. I'm currently working on v2 of the site in Astro, which won't use react for rendering these components.

rebootl commented 9 hours ago

:+1: Sounds good. Thanks for your reply.