Skip to content
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

Fetching windows takes multiple seconds #342

Open
mickh opened this issue Nov 22, 2023 · 4 comments
Open

Fetching windows takes multiple seconds #342

mickh opened this issue Nov 22, 2023 · 4 comments

Comments

@mickh
Copy link

mickh commented Nov 22, 2023

  • Version: 4.0.0 (134)
  • macOS: 14.1 (23B74)

On my machine I am finding that either of the calls below takes multiple seconds to execute.

   const windows = Space.active().windows({visible: true});
   const windows = Window.all({visible: true});

Not completely certain, but this might have started happening when I updated to Sonoma. It can take up to 10 seconds for the calls to return.

A clue: the problem goes away (temporarily) if I open and immediately close a new Safari window.

Any ideas? Anyone else seeing this? Any suggestions for how I could debug further? I'm guessing that installing the phoenix source and pursuing the problem that way is the go. Or is there another way?

BTW: Thanks for phoenix. It's awesome!

@mickh
Copy link
Author

mickh commented Nov 27, 2023

Update: I completely quit Safari and the problem disappeared. I recently switched from using Google Chrome to Safari and, now I think about it, perhaps the problems started surfacing with that switch. Not completely certain on the timing, but I am going to switch back to Chrome for a week or two to see if the problem no longer manifests.

@kasper
Copy link
Owner

kasper commented Dec 4, 2023

@mickh Sorry for the delay! Yes, this would indicate that one or more apps are not responding to API calls on a timely fashion, which then slows everything down. I have plans in the future to make this more dynamic and identify slowing apps faster for timeouts.

@aidan-gibson
Copy link

@mickh You aren't crazy, ever since Sonoma Phoenix has been crazy laggy for me (3+ seconds sometimes to resize a window on my normal laptop screen). To be fair my config is a disaster, but pre-Sonoma everything worked flawlessly. (also a big thank you to kasper for making this!!)

@hboon
Copy link

hboon commented Jan 17, 2024

It's definitely Safari for me. If I kill Safari, .windows() is fast, otherwise it takes 6-17 seconds.

(.windows({ visible: true }) takes a similar amount of time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants