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

Improve 'Invoke-WPFPresets' Public Function - Made applying tweaks presets go blazingly fast - Made Clearing Selection work properly #2608

Conversation

og-mrk
Copy link
Contributor

@og-mrk og-mrk commented Aug 22, 2024

Type of Change

  • Bug Fix
  • Refactoring

Description

By making Invoke-WPFPresets look into specific CheckBoxes through the use of checkboxfilterpattern parameter.. it's now doing the bare minimum to achieve the same goal, which's getting the Presets done on tweaks.

Besides the above optimization... the Clear Button only clear selection on the current tab, so when you click the Clear button on Tweaks Tab.. it'll only clear the selection inside the tweaks tab, and same idea with Install Tab. (this's done by using checkboxfilterpattern as well)

Testing

Tested it, and it works well.

Impact

It'll save a few milliseconds (depending on CPU Single Threaded Performance) when users click the Clear Button in Tweaks Tab.. besides that, no major impact on Developers & End-Users.

Clear Selection (Install Tab): 191.97013 -> 169.0366 millisecond (1.13x)
Clear Selection (Tweaks Tab):  211.59603 -> 4.0672 millisecond   (52x)
Applying Standard Tweaks: 374.7783 -> 18.7821 millisecond (19.95x)
Applying Minimal Tweaks:  392.9180 -> 18.6587 millisecond (21x)

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

@og-mrk
Copy link
Contributor Author

og-mrk commented Aug 22, 2024

@ChrisTitusTech
image

@ChrisTitusTech
Copy link
Owner

Very Nice! These optimizations stack up over time.

@ChrisTitusTech ChrisTitusTech merged commit be6b5b3 into ChrisTitusTech:main Aug 29, 2024
1 check passed
og-mrk added a commit to og-mrk/winutil that referenced this pull request Aug 29, 2024
ChrisTitusTech pushed a commit that referenced this pull request Aug 30, 2024
@AerumT AerumT mentioned this pull request Aug 31, 2024
@ChrisTitusTech ChrisTitusTech added the skip-changelog Skip Change Logs label Sep 10, 2024
@og-mrk og-mrk deleted the improve-Invoke-WPFPresets-public-function branch September 22, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip Change Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants