Issue description:
I noticed that, when saving a scene, Godot is parsing GDScript files that are completely unrelated to the scene.
I could notice that because that script contains an error and it showed up in the terminal.
The script was not one of the open scripts in the script editor, does not declare any class name and is completely unrelated to the scene i was saving.
The questions is: why is Godot parsing files at save time?
My concern is that, if the project grows very big, the save time will grow until it becomes noticeable.
For me it was around 1 second, with a project that has around 6k files.
I also noticed in another issue that Godot appears to load (and then compile) GDScript files just to generate thumbnails out of them, regardless of where the script is. Maybe it's related?
Godot version: 11d7738
OS/device including version: 4.19.4-arch1-1-ARCH
Issue description: I noticed that, when saving a scene, Godot is parsing GDScript files that are completely unrelated to the scene. I could notice that because that script contains an error and it showed up in the terminal. The script was not one of the open scripts in the script editor, does not declare any class name and is completely unrelated to the scene i was saving. The questions is: why is Godot parsing files at save time? My concern is that, if the project grows very big, the save time will grow until it becomes noticeable. For me it was around 1 second, with a project that has around 6k files.