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

Fixes #1502. Prevents high CPU usage. #1504

Merged
merged 10 commits into from Dec 18, 2021
Merged

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented Nov 1, 2021

Fixes #1520.

@tznind
Copy link
Collaborator

tznind commented Nov 15, 2021

Should this be user configurable? i.e. a static property on the NetDriver class? Something like WaitWinChangePollTimer? That at least empowers developers to adjust it based on system settings/hardware or desired refresh times or whatever?

@BDisp
Copy link
Collaborator Author

BDisp commented Nov 15, 2021

@tznind NetDriver is internal, like WindowsDriver and CursesDriver, with the exception of FakeDriver for unit test. So, it must doed in the Application, but only for NetDriver, like the AlwaysSetPosition property, which I don't like.
In my opinion this setting is enough, so no much low and not making much difference and no much high and give time enough to detect any windows resize. If anyone more expertise can come with a better and appropriate solution, can submit a PR before or after this PR.

@tznind
Copy link
Collaborator

tznind commented Nov 15, 2021

Cool, that sounds like a solid reason not to make it user configurable and that you have thought about it. So I am happy :)

@BDisp BDisp requested a review from tig November 22, 2021 01:06
@TETYYS
Copy link

TETYYS commented Nov 25, 2021

virtual medal to whoever releases this fix

Copy link
Collaborator

@tig tig left a comment

Choose a reason for hiding this comment

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

LGTM. Great work.

@tig tig merged commit e3bb7d6 into gui-cs:main Dec 18, 2021
@BDisp BDisp deleted the netdriver-performance branch December 18, 2021 13:27
@tig tig mentioned this pull request Dec 18, 2021
BDisp added a commit to BDisp/Terminal.Gui that referenced this pull request Dec 18, 2021
* Fixes keys modifiers not reseting and enter key on Windows Terminal.

* Fixes summary warnings.

* Ensures MainIteration processes  input while count greater than zero.

* Adding UseSystemConsole to the launch settings profile.

* Improves the performance with Console.Write by writing faster.

* Fixes gui-cs#1502. Prevents high CPU usage.

* Added a HACK comment.

* Allowing NetDriver attributes to deal with more stuff than only colors.

* Allows append more escape sequences if necessary.
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.

NetDriver isn't updating the screen well.
4 participants