-
Notifications
You must be signed in to change notification settings - Fork 26
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
Half second pause before results show up #10
Comments
Howdy Preston, Unfortunately I think that it might just be processing power and the true time it takes, but thank you for raising it. I will have a squiz and see what I can find, when I find the right files I will point you to them so you can have a look too. |
Awesome, thanks @stuartcryan! |
Just to let you know I haven't forgotten this... I have been doing some testing but thus far nothing has proven any faster. :( |
Thanks! I was actually just thinking of this yesterday. It's noticeably Thanks for diving into this! I use this package constantly, and am really
|
Howdy, I have stripped out a plethora of it. Can you please give this version a try https://dl.dropboxusercontent.com/u/9093155/Rapid%20Browser%20Tabs_1.2_beta1.alfredworkflow and let me know how you go. |
All righty... it looks like it isn't the regex. I did some time tests, the majority of the script takes (under ideal circumstances) ~200ms to run. I ran some timing tests and the applescript (outside of any ruby) getting the tabs from Chrome takes 530+ms just to run on its own, so it seems like this is the biggest time sink. If you put the following into a file named test.osascript and then run in terminal: You will see that result.
Now... there is a way to get around this, but I am loathed to suggest it and that would be to somehow prime what we are looking for, kick off a background process to get the results, cache them on disk and then if the file is less than say 15 seconds old use the cache. However, this would come with its own inherent problems. I would also not opt to do a cache that refreshes periodically as that would simply waste CPU cycles. Let me have a think, and see if there is any pleasant way I can come up with doing this that balances up to date information with speed. |
fantastic sleuthing! i'll also spend a bit of time thinking through ways around this. i wonder if there's just a more efficient way of querying the tab list from chrome directly- 530ms just to get the list of tabs seems a bit absurd. i wonder if it first has to create some kind of connection to chrome (like a db connection) before it can make the query. i've never messed around with this, so i'm just wildly conjecturing at this point! i'll try to do a little research- saving that half second would make all this flow much more naturally, and i use this all day long. |
Did any of you come up with a solution here? I'd be curious to see if there was a way around this too. Thanks for a great workflow! |
This is an awesome script, and I use it all the time!
One things I've noticed is that there's a several hundred millisecond delay between when I finish typing in my search query, and when results show up. It's totally livable, but I thought I'd check in and ask about it in case you knew the cause off-hand.
It appears to get longer if I have a bunch of tabs open, so it might just be the limits of processing power.
I don't know much Ruby, but that hasn't stopped me from hacking on Ruby scripts in the past. If you don't have time to investigate but can point me to where it might be worthwhile to look, I'm happy to spend a bit of time checking it out myself.
Thanks again for the awesome tool!
The text was updated successfully, but these errors were encountered: