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

Improved typing speed by caching match scores and optimizing #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

teglsbo
Copy link

@teglsbo teglsbo commented May 18, 2020

  1. Added caching of match scores.
  2. Avoided parsing of XAML XML by using objects instead. Moved XamlHighlighter to from Core to Switcheroo to avoid making Core dependant on WPF.
  3. Avoided a reset height when not needed which (after the two other changes) used the most time.

1) Added caching of match scores.
2) Avoided parsing of XAML XML by using objects instead. Moved XamlHighlighter to from Core to Switcheroo to avoid making Core dependant on WPF.
3) Avoided a resset height when not needed which (after the two other changes) used the most time.
@teglsbo
Copy link
Author

teglsbo commented May 19, 2020

I can see I need to fix a few things before this gets merged:

  1. I notice that I need to fix the titles for the non-first 10 windows. They only show the process name.
  2. If I make a search that doesn't return any results and then open switcheroo again, then the search bar is in the middle of the screen instead of center top (I have many windows open).
    I'll fix the above bugs sometime and I'll continue using this version, so it gets tested.

@daanzu
Copy link

daanzu commented May 20, 2020

@teglsbo FWIW, I would suggest using the window numbering from my commit daanzu@90b1549, which fixes some issues with the original implementation.

…Title was used for Title instead of AppwWindow.Title).

Reverted the CenterWindow() changes since it didn't handle varying heights of Switcheroo itself, when it filters to fewer windows.
@teglsbo
Copy link
Author

teglsbo commented Jun 1, 2020

I have fixed the bug with the titles and reverted the CenterWindows optimizations, so that bug is fixed as well.
@daanzu: I didn't include your change. I wasn't sure how I should merge it. Note that I have changed the type of FormattedTitle from XAML XML (where text and formatting was added without any escaping, and parsing it was expensive) to List<Inline>.

@teglsbo teglsbo closed this Jun 1, 2020
@teglsbo teglsbo reopened this Jun 1, 2020
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.

3 participants