nate-parrott / Flashlight

The missing Spotlight plugin system
http://flashlight.nateparrott.com
Other
5.39k stars 411 forks source link

FIX: Spotlight halt on task wait #132

Closed stnvh closed 9 years ago

stnvh commented 9 years ago

If a bash task is ran too frequently, or takes a considerable amount of time to run, spotlight waits until each task has finished due to [task waitUntilExit]; causing spotlight to become unresponsive.

nate-parrott commented 9 years ago

The -waituntilexit is necessary to get back plugin results — we can't read their output until they've finished. A better solution would probably be to kill the task that's processing a specific search if that search changes—that way, we'd lighten the load on the system. On Thu, Nov 27, 2014 at 11:05 AM Stan Hutcheon notifications@github.com wrote:

If a bash task is ran too frequently, or takes a considerable amount of time to run, spotlight waits until each task has finished due to [task

waitUntilExit]; causing spotlight to become unresponsive.

You can merge this Pull Request by running

git pull https://github.com/stnvh/Flashlight master

Or view, comment on, or merge it at:

https://github.com/nate-parrott/Flashlight/pull/132 Commit Summary

  • fix spotlight halt on task run

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/nate-parrott/Flashlight/pull/132.

stnvh commented 9 years ago

I've seen methods which make use of an ajax callback, although I've not looked into it. It may not even work due to the webview being refreshed each time the query string changes. I'll close this for now.