Slow xcode

Hello everyone, I downloaded xcode to try to learn the swift language, but as soon as I start it the mac becomes incredibly slow, it can't even show the preview of "Hello world". The space I have on the disk is 950gb and I have installed Big Sur at the latest version, I have an iMac from 2017. I also tried to initialize the mac to see if it solved the problem, but as soon as I install it the same thing happens. Can you help me? thank you so much
How much memory does your iMac have?

As far as I checked the specs of 2017 iMac, it should have enough resources to run Xcode.

I also tried to initialize the mac

What do you mean by initialize? Did you re-installed macOS and removed all the apps?
My mac has 8gb of ram, it's 21.5 "4k. I reinstalled macOS ...

I reinstalled macOS

Seems your Mac has some damages.

Even on a higher spec machines showing the preview of "Hello world" may take minutes.
How long will it take on your Mac? Hours? Or not able to show even waiting for days?
I don't know how long it takes, I let it load about 20 minutes and no preview appeared, in the meantime the mac was very slow ... what damage can the mac have? I also performed the SOS of the disk but everything is ok

I also performed the SOS of the disk but everything is ok

Seems all what I can think of are over.
A few minutes for preview of "Hello world" is quite normal, but 20 minutes is very rare...

Better keep this thread open and wait for someone who has experienced the same issue.

Hope your issue will be solved soon. And when solved, please share your experience.
Ok! Thank you very much for your availability. Good day. I really hope to solve it, I'm looking forward to studying Swift and trying to make an app.
Slow xcode
 
 
Q