FoalTS / foal

Full-featured Node.js framework, with no complexity. 🚀 Simple and easy to use, TypeScript-based and well-documented.
https://foalts.org/
MIT License
1.88k stars 137 forks source link

High CPU usage on all documentation pages #958

Closed sshquack closed 3 years ago

sshquack commented 3 years ago

Hello, Thanks for creating FoalTS! I was just checking out Foal for the first time and it looks great.

I went to the docs page (https://foalts.org/docs/) and suddenly noticed a high spike in CPU. This happens consistently across all doc pages. Here are some screen recordings and details:

Chrome: Version 91.0.4472.77 (Official Build) (x86_64) / macOS: 10.15.7 (19H1217) Note: The chrome task manager and the macos system monitor on the right indicating a 40-60% CPU use without any extensions or other tabs.

https://user-images.githubusercontent.com/5678459/120726302-989fb100-c48c-11eb-957c-6946affe512d.mp4

Firefox: 89.0 (64-bit) / macOS: 10.15.7 (19H1217) / / macOS: 10.15.7 Note: The firefox performance manager and the macos system monitor on the right indicating a 40-60% CPU use without any addons or other tabs.

https://user-images.githubusercontent.com/5678459/120726297-95a4c080-c48c-11eb-9e1a-89c917d6c61b.mp4

Please investigate!

sshquack commented 3 years ago

Note sure if this might be related to docusaurus (https://github.com/facebook/docusaurus/releases) but it might be worth upgrading to the latest version 2.0.0-beta.

https://github.com/FoalTS/foal/blob/e15cf92c400228679907ab8eb4ec2ea1212c07a1/docs/package.json#L16-L18

LoicPoullain commented 3 years ago

Thank you for reporting this issue. I'll try to update docusaurus to v2@beta and see how it goes.

LoicPoullain commented 3 years ago

@sshquack I upgraded to beta.1. How does it go now?

sshquack commented 3 years ago

@LoicPoullain That seems to have fixed it! The CPU usage now matches the Docusaurus docs. Thanks!