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

Reduce large amount of unneeded writing to stdout #97

Merged
merged 2 commits into from Sep 28, 2020

Conversation

aaronjanse
Copy link
Owner

ColorNone means that the default colors should be used, meaning Code is meaningless. Two ColorNones with different Codes are identical but previously were not treated as such, causing the renderer to very often (every 25 milliseconds) print reset color commands unnecessarily.

I bet this also means much less idle CPU usage, but I haven't tested this theory.

Copy link
Collaborator

@PotatoParser PotatoParser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though there might be some boolean simplification needed.

render/cursor.go Outdated Show resolved Hide resolved
render/cursor.go Outdated Show resolved Hide resolved
@aaronjanse
Copy link
Owner Author

Whoops, good catch! Those || true were from testing. Now removed :-)

Copy link
Collaborator

@PotatoParser PotatoParser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I've tested a bit of the idle CPU usage, and it looks like this does improve it (by a bit)!

@aaronjanse aaronjanse force-pushed the aj2020sep-recognize-charset-command branch from 0fe5134 to 99da7bb Compare September 28, 2020 23:45
ColorNone means that the default colors should be used, meaning Code is meaningless. Two ColorNones with different Codes are
identical but previously were not treated as such.
@aaronjanse aaronjanse changed the base branch from aj2020sep-recognize-charset-command to master September 28, 2020 23:48
@aaronjanse aaronjanse merged commit 215740b into master Sep 28, 2020
@aaronjanse aaronjanse deleted the aj2020sep-none-style-diff branch March 8, 2021 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants