Jump to content

Bug: Long inputs freeze Alfred


rolandschuetz

Recommended Posts

Hello,

 

first of all, you have a great app and I really enjoy using it :)

 

I often run into this bug:

 - I open the Alfred intput

 - I paste my clipboard content in Alfred (cmd+v), while having a lot of text in the clipboard

 - Alfred hangs (seems to try to parse all and does not react anymore, I have to kill it)

 

Whether you were able to replicate it:

 - Yes, with any real long input (MySQL export, html, php code, …)

 

Alfred version: v2.0.7 (205)

Mac OS: 10.7.5

 

Thanks,

Roland

Link to comment
Share on other sites

 

Hello,
 
first of all, you have a great app and I really enjoy using it :)
 
I often run into this bug:
 - I open the Alfred intput
 - I paste my clipboard content in Alfred (cmd+v), while having a lot of text in the clipboard
 - Alfred hangs (seems to try to parse all and does not react anymore, I have to kill it)
 
Whether you were able to replicate it:
 - Yes, with any real long input (MySQL export, html, php code, …)
 
Alfred version: v2.0.7 (205)
Mac OS: 10.7.5
 
Thanks,
Roland

 

 

Hi there,

 

Alfred should defend against this - could you give a more specific example of something which is causing this behaviour?

 

Cheers,

Andrew

Link to comment
Share on other sites

  • 1 month later...

Hello Andrew,

 

here's an example:

http://screencast.com/t/WvDJimCPI2eL

In the video the curser stays the normal cursor, not sure why. On the screen it shows the working-cursor as soon as I paste the content.

 

Best regards,

Roland

 

Could you select the Alfred process and click 'sample process' in Activity Monitor, this should help us see where the pause is happening. Also, if you could disable little snitch during the test too, just in case that's getting in Alfred's way.

 

Also, if you have a Powerpack, could you fill in your details on your forum profile so me and Vero could see it.

 

Cheers,

Andrew

Link to comment
Share on other sites

Hello Andrew,

 

I'm not sure what samples process is (my Mac is in German), I could guess you mean the analyze,  if not please let me know:

http://screencast.com/t/WJXBuPlGy

 

Here's the data:

https://db.tt/g6vsDg4R

 

 

Powerpack data is added.

 

Cheers,

Roland

 

The freeze looks like it is caused in OS X's metadata querier. Alfred calls this asynchronously so this definitely shouldn't freeze unless there is something wrong.

 

Could you please try doing a full low level reindex using this method:

 

http://skillzdesign.com/blog/clarifies/forcing-spotlight-reindexing-using-terminal/

 

Cheers,

Andrew

Link to comment
Share on other sites

Exactly same issue.

 

Well, if it is really only a problem on my notebook, then don't worry.

 

I'm not sure what to suggest, but I'm certain that reinstalling will fix things... perhaps when 10.9 Mavericks is officially released :)

 

Cheers,

Andrew

Link to comment
Share on other sites

  • 1 year later...

I'm currently looking into this off the back of a conversation I've been having with Tyler this past week. Essentially, there are some situations where Alfred should just ignore the query when the input gets too big.

 

I'll post back in this thread with my findings, but I've already made some progress on improving this situation :)

Link to comment
Share on other sites

Right, I've put in some arbitrary discard limits to stop Alfred from performing certain actions when it's obvious that they shouldn't be run, for example... when pasting in that angular js, don't use OS X's metadata server to search for files and don't use the Contacts API to search for contacts (these were the two big culprits).

 

If you could grab this test build and let me know how you get on:

-- build removed, see newer build below --

 

Note that there is still a little pause when handling the large text pasted in, but this should no longer freeze Alfred or make him use GBs of memory.

 

Cheers,

Andrew

Link to comment
Share on other sites

Good news:

The long input no longer crashes Alfred. So that much is fixed.

 

Bad news:

Build 375 isn't letting me search for files (tested using the ' and "open" keywords). 2.6 stable still works.

 

Also, memory usage is still high for me (in both build 375 and 374 stable). When I first launch Alfred, it runs on the expected 14-20MB of RAM, but once I enter a query, it jumps to 40+MB and slowly grows over time.

Link to comment
Share on other sites

Also, memory usage is still high for me (in both build 375 and 374 stable). When I first launch Alfred, it runs on the expected 14-20MB of RAM, but once I enter a query, it jumps to 40+MB and slowly grows over time.

 

I was a bit over zealous with the query filtering... here is a better one to try:

https://cachefly.alfredapp.com/Alfred_2.6.1_376.zip

 

Also, 40MB ram isn't high if you are pasting in large chucks of text. Alfred is running the entered query through all relevant workflows including any scripts or script filters which may match, which is all added to the usage shown in Activity Monitor. If a script is using lots of ram, there isn't much Alfred can do about this other than tidy up after the script has finished.

 

You shouldn't be seeing this grow over time though (If you want to monitor this, use Instruments, not Activity Monitor) - I've profiled this latest build and it's without leaks so any growing allocation will be marked as inactive by OS X and cleaned at some point later. Either way, I think this latest build will give you the best behaviour based on what you were experiencing above.

 

Cheers,

Andrew

Link to comment
Share on other sites

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