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

CLI Speed improvements. #23189

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

tzarc
Copy link
Member

@tzarc tzarc commented Mar 1, 2024

Description

We've been trying to work on this for a while:

  • Loading JSON files can take a while, so we remember their post-load state
  • Concerns were made that the resulting data could be modified, so we deepcopy and return that instead
  • lru_cache of 0 was actually doing nothing but logging, so sizes were adapted to be nonzero.

Before:

qmk find -f 'exists(split.matrix_pins)'  571.96s user 6.05s system 1137% cpu 50.815 total

After:

qmk find -f 'exists(split.matrix_pins)'  349.67s user 3.47s system 1119% cpu 31.539 total

Types of Changes

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

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • 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).

@tzarc tzarc requested a review from a team March 1, 2024 10:30
@github-actions github-actions bot added python cli qmk cli command labels Mar 1, 2024
@tzarc tzarc merged commit 1875659 into qmk:master Mar 1, 2024
5 checks passed
@tzarc tzarc deleted the cli-json-speed-improvements branch March 1, 2024 21:45
dlip added a commit to dlip/qmk_firmware that referenced this pull request Mar 6, 2024
* upstream/master: (245 commits)
  Attempt to fix changed files on CI workflow (qmk#23205)
  Bump peter-evans/create-pull-request from 5 to 6 (qmk#22995)
  Iron180 V2 H: correct key sizes (qmk#23214)
  `mntre_v3`: correct layout data (qmk#23216)
  Iron180 V2 S: correct ANSI Enter key sizes (qmk#23215)
  Workaround for uart makefile issues (qmk#23192)
  Normalise .editorconfig. (qmk#23186)
  Remove cd suggestion from new-keyboard (qmk#23194)
  CLI Speed improvements. (qmk#23189)
  Fix up AVR production build target. (qmk#23190)
  Fixing typos for OSAv2 and OSAv2_Topre (qmk#23161)
  geistmaschine/geist: enable mousekey, fix issues in default/via keymap (qmk#23187)
  Merge point for 2024q1 Breaking Change
  2024q1 `develop` changelog. (qmk#23150)
  Update Atmel DFU driver assignments for dfu-programmer 1.x (qmk#23165)
  Merge upstream uf2conv.py changes (qmk#23163)
  Satisfaction75 post merge updates (qmk#23158)
  Ensmallification of `helix/rev3_5rows:via`. (qmk#23159)
  Cleanup Satisfaction75 Firmware and add new revisions (qmk#22082)
  cipulot/common: Fix for multiple AMUX usage (qmk#23155)
  ...
whoisjordangarcia pushed a commit to whoisjordangarcia/qmk_firmware that referenced this pull request Jun 8, 2024
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli qmk cli command python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants