We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consola v3.2.3
Node v20.7.0 / v18.17.1 Deno v1.36.4
import { consola } from 'consola'; consola.log('x'.repeat(200000));
Printing a too-long-line causes 100% CPU workloads because of the high cost of Intl.Segmenter in string-width used by FancyReporter.
Intl.Segmenter
string-width
FancyReporter
consola/src/reporters/fancy.ts
Lines 40 to 46 in 059bd63
This could be a bug or a specification of string-width, but it is problematic when used as a part of logger.
on Bun 1.0.0, it is safe by the way. (I don't know whether its Intl.Segmenter is fully functional)
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Consola v3.2.3
Node v20.7.0 / v18.17.1
Deno v1.36.4
Reproduction
Describe the bug
Printing a too-long-line causes 100% CPU workloads because of the high cost of
Intl.Segmenter
instring-width
used byFancyReporter
.consola/src/reporters/fancy.ts
Lines 40 to 46 in 059bd63
https://github.com/sindresorhus/string-width/blob/f6e70c4c8de68ea2797a8765f1c7350ef0929a83/index.js#L27
Additional context
This could be a bug or a specification of
string-width
, but it is problematic when used as a part of logger.on Bun 1.0.0, it is safe by the way. (I don't know whether its
Intl.Segmenter
is fully functional)Logs
No response
The text was updated successfully, but these errors were encountered: