I just found that internalised data in an input is not cleared after you reconnect a cable to that input. I realised after internalising some data in a component to copy/paste to a new definition and send to someone and after that I reconnected the cables and every operation became super-slow.
I thought that it could be because the autosave saving before every cable connection all the internalised data that I previously add to some component inputs. So I found the component and even with cables connected to the input I cleared the data on those. After that everything became normal and fast.