Hi
I have an app which I’m in the process of sandboxing (using App Wrapper). I notice that my sandboxed app now takes about 10 times longer to open/save/access files than the non-sandboxed app. Some more disk intensive activity in the app even seem to cause timeouts/app not responding.
The structure I have adopted for filing has the primary user files stored in SpecialFolder.Documents. On fileOpen these are copied to a temporary file in specialFolder.Temporary which is where the database is loaded from into the app. Database changes are therefore made into the temporary file. FileSave then copies the temporary file back to the primary folderItem location (having, of course, first deleted the old primary file). This structure therefore emulates the more traditional structure of only keeping changes to the file upon FileSave - rather than Apples newer versions.
The slow file access is particularly noticeable during regular database update activities (i.e. to/from the temporary file) rather than in the initial fileOpen, fileSave commands.
The questions are, therefore,
- is it normal that sandboxing slows down file access.
- Is the above the preferred way of saving databases
- Are there better ways of doing it that avoid sandboxing speed penalties?
Jim