-
Notifications
You must be signed in to change notification settings - Fork 350
WIP: Non-blocking filtering #59
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
Conversation
Whoops, found a critical crash. Don't use yet |
Fixed |
Cool! Did you try to measure somehow the increase in responsiveness to see what helps? Does moving into background queue actually help? Or is it solely the effect of adding the delay? I am worried that not everything we are using is safe to use from another thread than one calling Since it is a sensible thing to do, it might be the case that Xcode already calls Why store Why I think the suspicious |
Hey guys! I've been using this branch all morning and seems to run pretty well. Although I just noticed this, if I type each letter of something that pops up in the autocompletion this happens: So, say I want to type all the characters in NSString
|
No hard measuring, purely subjective, but given that filtering takes 100-200ms for me, having it no longer block the main thread makes it significantly more usable. From what I can see, Xcode doesn't call it with a delay because prefix-only matching is fast enough to not warrant the extra complexity. Good point on storing forceFilter, I'll change it. Wanted to make sure there was no major stability issues first before focusing on cleanup. I picked |
@mokagio that's crazy! I can't seem to reproduce that locally at this stage though. Does it happen 100% of the time for you? |
@mokagio what settings are you using? I'm on the same build of Xcode and tried changing a few settings but still can't seem to reproduce |
@chendo I'm using the defaults settings. What other information can I give you? Before building the feature branch I removed the plug-in via Alcatraz, restarted Xcode, then built the project. |
@mokagio if you could screenshot me each settings page that'll be tops. Also can you confirm it's that branch by going back to the alcatraz package? |
Copied settings exactly and now I can reproduce |
You can avoid the problem by disabling inline preview for the time being. Personally, I prefer it have it turned off to easier see what I'm typing |
Ok, glad that you can reproduce, first step to fix it 👍 😃 |
Hard to reproduce because who actually types ALL the characters? 😆 |
@iosengineer lol that's true, it's the whole point of the plugin right? 😛 I found it out when writing a variable named |
@chendo merrrgggeee thissssssss |
I haven't been able to revisit this recently but the plugin hasn't crashed for me in the last couple of weeks. @slazyk good point regarding the forceFilter variable, I'll remove it when I have the time. Any other issues? |
I haven't tested much, but was able to reproduce what @mokagio reported, and also remember seeing wrong results in some cases, let me investigate a little. BTW I should have some spare time soon, I can try finishing this up if you don't have the time. |
Personally, I think showing inline preview makes correcting a typo harder so I have it off, which is why I didn't notice while developing. Are there stats on how many people have the option turned on? Cool, that's fine by me. |
Any updates about non-blocking filtering? |
Superseded by #102 |
This PR moves the fuzzy matching off the main thread for much improved responsiveness. It also only executes the fuzzy matching after 50ms of no typing activity to decrease the number of searches significantly which should save battery life.
I haven't used it enough to make sure it's stable, would like to have people help me test this particular branch.