phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Fetching windows takes multiple seconds

Open mickh opened this issue 2 years ago • 7 comments

  • 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 avatar Nov 22 '23 06:11 mickh

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.

mickh avatar Nov 27 '23 05:11 mickh

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

kasper avatar Dec 04 '23 13:12 kasper

@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!!)

aidan-gibson avatar Dec 05 '23 18:12 aidan-gibson

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)

hboon avatar Jan 17 '24 00:01 hboon