Jump to content

massive input lag when processor under load


Recommended Posts

whenever i'm doing anything processor heavy, like rendering video, alfred recently has started exhibiting massive lag on keyboard input.

 

text input in any other area of the system is not effected, even spotlight which is also doing realtime searches. this makes alfred much less useful now as a productivity tool, since it is almost unbearable to use while working.

 

is this a known bug, or is there something i could do that might help alleviate this? (no, not using my computer for anything else is not an option, sorry!  :P )

Link to comment

This is something I could likely improve but it would have compromises such as going in the opposite direction and allowing a processor intensive workflow to slow your Mac down. Having said that, I suspect that the lag will have something to do with OS X's metadata querying which is allegedly asynchronous, but I've definitely seen the setup calls being held / blocked which adversely affects Alfred.

 

I'm going to raise an internal ticket to see if there is something I can do to improve this situation.

 

*Pets MacBook above screen, don't worry, this won't last long...* ;)

 

Cheers,

Andrew

Link to comment

Does Alfred run workflows at a lower priority? I've always assumed this is why it (and Sublime Text) seem to suffer more than most other programs I regularly use when the CPU is maxed out.

 

 

Alfred runs at the default priority, but I think it's the metadata stuff causing issues. Interestingly, in my experimentation this morning, I can't get lag in Alfred even with my processor running at 100% on both my iMac and MacBook.

Link to comment

Have you tried encoding a video with HandBrake/ffmpeg? That usually does the trick for me.

 

I don't recall ever experiencing lag on my MBA, which has a 128GB SSD, versus 1TB SSD + 4–9TB HDD on the Mac Pro, so index size/latency might also be factors?

Link to comment

This is something I could likely improve but it would have compromises such as going in the opposite direction and allowing a processor intensive workflow to slow your Mac down. Having said that, I suspect that the lag will have something to do with OS X's metadata querying which is allegedly asynchronous, but I've definitely seen the setup calls being held / blocked which adversely affects Alfred.

 

I'm going to raise an internal ticket to see if there is something I can do to improve this situation.

 

*Pets MacBook above screen, don't worry, this won't last long...* ;)

 

Cheers,

Andrew

 

 

thanks for the reply!

 

i don't know if this would create more problems, but what about a scenario where text input refresh is somehow disconnected from the search results? i'm totally cool with waiting a bit longer for results if i'm doing heavy lifting elsewhere, it just hurts my brain a bit when i type and there's a momentary delay before the characters appear on screen!

 

i'm guessing the biggest issue would be that you could then have "out of date" results for your onscreen text.

Link to comment

i'm guessing the biggest issue would be that you could then have "out of date" results for your onscreen text.

 

That's already a common situation with Alfred, most noticeably for workflows that take a good fraction of a second to run. It's very common for slow-running workflows to deliberately show you old data until they've had time to update in the background. Most of my workflows do this, and the workflow library I wrote is designed around the idea of showing the old data till you've grabbed the new data.

 

What always catches me out is Alfred's window not appearing quickly enough after I hit its hotkey, so I end up typing in the wrong application. I'm not sure Alfred is any slower to activate than any other application, however.

 

Typing lag is definitely more of an issue in Alfred than most other apps I use. I'd also like to emphasise that it's not actually an issue for me. (But that's 95% because Sublime Text—my other most-used app—behaves so badly when the system is under heavy load that I have no option but to limit programs like ffmpeg or HandBrake to ~600% CPU.)

Edited by deanishe
Link to comment
  • 2 weeks later...

I've started profiling and modifying Alfred to better improve performance under load and just put the 3.1 b715 pre-release live. If you update, you should see an overall improvement in file search performance and lower lag in Alfred, especially when the Mac is under load. 

 

While I'm far from finished on this, I'd be interested in hearing your feedback on b715 when it comes to the lag you're experiencing.

 

Cheers,

Andrew

Link to comment
  • 8 months later...

I'm using version 3.3.2 and am still experiencing frequent keyboard lag after the Alfred window pops up and I begin typing. The delay in response ranges from a few seconds to approximately 10 secs.  When it happens, I just keep typing and hit return.  When Alfred finally responds, the operation completes successfully.

 

Late 2014 Mac mini, El Capitan 10.11.6, 8GB

Typical apps running: Itunes, Google Chrome, Thunderbird, Sugarsync.

 

Thanks for your help,

John Hollister

Link to comment

@johnhollister Welcome to the forum, John. :)

 

A few things to check:

- If you're seeing an input delay, is your Mac under heavy load? This discussion focuses on lag under heavy load, so I assume you're referring to the same thing?

- In Features > Default Results, do you have external volumes in your search scope?

- When you have a moment, I would recommend rebuilding your Mac's metadata index in case there's corruption in your index, causing the results to lag. You can do this in the Advanced preferences tab.

 

Cheers,
Vero

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...