Delay When Executing SweetPad Commands in Cursor/VS Code
Hi! I have noticed there is some delay (3 to 5 seconds) when executing the commands, going from:
Executing task: sweetpad: build
to
🚀 Executing command:
xcodebuild -scheme Meshing -configuration Debug -workspace /Users/rudrankriyam/Downloads/Meshing/Meshing.xcodeproj/project.xcworkspace -destination platform\=iOS\,id\=00008140-000104303633001C -resultBundlePath '/Users/rudrankriyam/Library/Application Support/Cursor/User/workspaceStorage/c26896c610692a109a35c94975a16cde/sweetpad.sweetpad/bundle/Meshing' -allowProvisioningUpdates build
Do you know what can be the reason behind this?
Hello! Before performing an actual "build" action, the extension tries to detect schemes, configurations, and build settings by executing the xcodebuild -showBuildSettings and xcodebuild -list commands. I think the slowdown comes from these commands because, when I've executed them for the first time, I also noticed that they run slowly. Of course, the results are cached for subsequent calls, but unfortunately, the first execution will always be slow.
One way to improve this is by parsing the files manually, but I’m not sure I’m ready to commit to this. You can also can debug this by setting log level to the "debug" in .vscode/settings.json and see all comands that extension executes:
{
"sweetpad.system.logLevel": "debug"
}
Overall I'm really appreciating Sweetpad, and would love to see this improved.
For the record, the way I am witnessing this is that I initiate a build (say, "SweetPad: Build (without Run)") and get a 5~ second delay, after which I see both Executing task: sweetpad: build and Executing command: xcodebuild -scheme ... build spit out to the terminal basically simultaneously.
I unfortunately couldn't seem to get "sweetpad.system.logLevel": "debug" working when I added it to .vscode/settings.json. Would have liked to confirm the cause of the delay. I'm using Cursor FWIW, although I imagine this affect the functionality of the logLevel.