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

Eager pk/pr optimization #5621

Merged
merged 3 commits into from
Apr 15, 2019
Merged

Eager pk/pr optimization #5621

merged 3 commits into from
Apr 15, 2019

Conversation

alex-ong
Copy link
Contributor

@alex-ong alex-ong commented Apr 15, 2019

Eager pk/pr will now have effectively 0 runtime when no debouncing is required

Description

A boolean stores whether we are currently debouncing anything.
We can skip scanning the matrix if we are are not debouncing.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Haven't gotten around to testing the changes due to no qmk keyboard easily available.
May alleviate #5620, though i see no reason why it would.

@drashna
Copy link
Member

drashna commented Apr 15, 2019

Tested. And this appears to fix #5621

@alex-ong
Copy link
Contributor Author

Tested. And this appears to fix #5621

Works... but i don't know why...
image

@noroadsleft
Copy link
Member

Tested. And this appears to fix #5621

#5620*

@XScorpion2
Copy link
Contributor

So an interesting possible future extention using a dirty boolean: if scanning a large matrix takes too much time, you could switch that boolean to a dirty mask that can identify smaller portions of the matrix that need to be scanned for debounce. I do that in the oled driver pr #5288 as an example.

@drashna drashna merged commit d0fb700 into qmk:master Apr 15, 2019
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Apr 17, 2019
* Optimizations to eager_pk

* eager_pr also uses changed boolean now.
foosinn pushed a commit to foosinn/qmk_firmware that referenced this pull request May 6, 2019
* Optimizations to eager_pk

* eager_pr also uses changed boolean now.
shimesaba-type0 pushed a commit to shimesaba-type0/qmk_firmware that referenced this pull request Jun 22, 2019
* Optimizations to eager_pk

* eager_pr also uses changed boolean now.
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
* Optimizations to eager_pk

* eager_pr also uses changed boolean now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eager PR issue
5 participants