Speeding up Applescripting in xcode
Speeding up Applescripting in xcode
- Subject: Speeding up Applescripting in xcode
- From: Tobias Ford <email@hidden>
- Date: Fri, 4 May 2007 22:35:01 -0500
I'm using AppleScript to build project files. I'm adding the files
using the loop below:
set theDirectoryContentList to every paragraph of
theDirectoryContents as list
repeat with content in theDirectoryContentList
set theSourceFileName to (content as string)
if (theSourceFileName is not equal to "") then
set theSourceFilePath to (pathToDirectory as string) & "/" &
theSourceFileName
tell groupToAddFilesTo
set sourceFile to make new file reference with properties {path
type:"project relative", full path:theSourceFilePath,
name:theSourceFileName}
add sourceFile to projectTarget
end tell
end if
end repeat
This is really, really slow. I'm updating about 12 (soon to be more
projects) with as many as a 400 files. The whole process takes about
15 minutes on my macbook. 99 percent of the time is spent in xcode
due to the calls "make new file reference" and "add sourceFile to
projectTarget"
Is there a faster way to do this? Can I batch make and add?
Thanks in advance.
-------------------
Tobias Ford...
tobias1482 'at' mac.com
tford 'at' spacetimestudios.com
-------------------
Sr Programmer @ space time studios for a generic space game mmo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden