elig0n / Switcheroo

The humble incremental-search task switcher for Windows. With my own extensions
https://www.switcheroo.io
GNU General Public License v3.0
54 stars 10 forks source link

Improved typing speed by caching match scores and optimizing #22

Open teglsbo opened 4 years ago

teglsbo commented 4 years ago

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.

teglsbo commented 4 years ago

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 commented 4 years ago

@teglsbo FWIW, I would suggest using the window numbering from my commit https://github.com/daanzu/Switcheroo/commit/90b1549a83d8432470f35f8c3462249f75b08723, which fixes some issues with the original implementation.

teglsbo commented 4 years ago

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>.