Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the resource consuming of the next.js #1749

Open
dadiorchen opened this issue Jan 27, 2024 · 1 comment
Open

Optimize the resource consuming of the next.js #1749

dadiorchen opened this issue Jan 27, 2024 · 1 comment
Labels

Comments

@dadiorchen
Copy link
Collaborator

image Now the web map client is consuming a lot mem (comparing to our microservice node.js instance), is it possible we can reduce it? Buy settings or other way?
@RingoTC
Copy link
Contributor

RingoTC commented Mar 13, 2024

I think this issue may be caused by the usage of log.warn in the production environment.
loglevel is building upon the console.log. If a variable is created and logged by console.log, it can't be collected by gc of V8.
For react, because the repaint, this problem will trigger more frequently.
Here are some materials related to this problem.

https://javascript.plainenglish.io/can-console-log-cause-memory-leaks-how-to-make-a-browser-crash-with-console-log-b94e4d248ed8
https://stackoverflow.com/questions/33283446/loop-of-console-log-in-nodejs

I think we should restrict the log in the production environment and move some unnecessary log.warn to log.debug for development needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants