sweetpad-dev / sweetpad

Develop Swift/iOS projects using VSCode
https://marketplace.visualstudio.com/items?itemName=sweetpad.sweetpad
MIT License
618 stars 20 forks source link

Delay When Executing SweetPad Commands in Cursor/VS Code #66

Open rudrankriyam opened 3 weeks ago

rudrankriyam commented 3 weeks ago

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?

hyzyla commented 1 week ago

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"
}

CleanShot 2024-11-17 at 19 48 56@2x