bit2pixel / chrome-control

A JXA script and an Alfred Workflow for controlling Google Chrome
https://medium.com/@bit2pixel/how-i-navigate-hundreds-of-tabs-on-chrome-with-jxa-and-alfred-9bbf971af02b
MIT License
189 stars 25 forks source link

Huge list command performance improvement to make loading results instant #7

Closed AnthoPakPak closed 3 years ago

AnthoPakPak commented 4 years ago

As I've stated in the issue #6 (Any way to improve list efficiency?), since I've got hundreds of tabs opened, I often has to wait up to 10 seconds for the list command to return the results. After lot of research I've founded out a way to improve the command efficiency.

This is done by initially storing all tabs titles/urls in double entries arrays (matching windows/tabs indexes) instead of requesting the values in a double for loop.

The difference is blazing! Results are now returned almost instantly even when you have hundreds of tabs. I hope code will be merged so that others will also profit from these changes 👌

epilande commented 3 years ago

This is amazing BTW.. Initially my tabs were taking 20~30 seconds to retrieve. After applying these code changes locally it loaded instantly

luckman212 commented 3 years ago

Just realized this initial work was done almost a year ago. Is @bit2pixel around? Any chance for a merge?

luckman212 commented 3 years ago

In case anyone's impatient, I just pushed a release 1.0.4 to my fork that incorporates this and a couple of other minor fixes.

bit2pixel commented 3 years ago

@AnthoPakPak thank you so much for contributing, this is fantastic! I'm merging this in and will create a new Alfred workflow on the weekend.

bit2pixel commented 3 years ago

Just realized this initial work was done almost a year ago. Is @bit2pixel around? Any chance for a merge?

Hey @luckman212, thanks for the ping! I took a break from github, back now, just merged the changes :)