2 second lag while switching between files by clicking them.

I'm using Xcode9 GM and everytime a click on a swift or .m/.h file in the project, it takes up to 2-3 seconds to open the file.

It's very annoying since you usually switch between files very often.

Curiosly, it does not happen if I open the file by CMD+SHIFT+O or if I swich between .m and .h by CMD+OPTION+ARROW_UP

It didn't happened before GM also...

Do you know what could it causing it?

Accepted Reply

Ok, problem solved.

It seems that the mouse Double-Click Speed you set on Preferences has a direct impact on the problem.


https://imgur.com/tRY3724


Somehow, if the Double-Click speed is slow, then Xcode "waits" to open a file when it is clicked in the project view. I suppose that Xcode waits when the click is done that time to see if it is a double click or a single click. I fixed the problem moving the setting to "Fast"

It's very weird since no other editor I use (VScode, atom, sublime..) works this way...

Replies

Ok, problem solved.

It seems that the mouse Double-Click Speed you set on Preferences has a direct impact on the problem.


https://imgur.com/tRY3724


Somehow, if the Double-Click speed is slow, then Xcode "waits" to open a file when it is clicked in the project view. I suppose that Xcode waits when the click is done that time to see if it is a double click or a single click. I fixed the problem moving the setting to "Fast"

It's very weird since no other editor I use (VScode, atom, sublime..) works this way...

That's logic. If system wants to be able to detect double click, it has to wait for the time set for double click befor considering it was in fact a single click ! The longer the longest delay in single click.