Lots of reports of slowness - translocation?

People with High Sierra are starting to report my app runs very slowly.
Is this translocation happening ?

I have this code in my app open() event which I thought would avoid it:

[code] Terminal.Execute("xattr -dr com.apple.quarantine "+app.ExecutableFile.Parent.Parent.Parent.ShellPath)

[/code]

Ive been trying to detect wrong placement this way:

if app.ExecutableFile.Parent.Parent.Parent.Parent.shellpath <> specialfolder.Applications.ShellPath then msgbox "The app is not in /Applications folder. It may run slowly until moved there" end if

The usual complaint from users. Have them first tell you what runs slowly. And no, AppTranslocation usually doesn’t have anything to do with speed.

This is a real, extreme difference between my machines and theirs.
Reports of delays of several seconds between action and effect.
It’s not a difference in expectation, and its not ‘everyone but me’ - so far its maybe 0.01% of the installed base (based upon emails received… I have to assume some people will plod on , or give up without telling me)

You got a couple of options. Have you done a Skype or Facetime session to watch your app in action?

Does the slowdown happen always or only sometimes? Do you have logging in your app? Then you could log a couple of steps to see exactly where the slowdown occurs.

Ask your users if one is a developer or not afraid to play around. Have him/her install XCode and do an Instruments session. Even a snapshot from the ActivityViewer would be informative.

Maybe on the second run, but not on the first. The best way to avoid translocation is to use a signed DMG file for distribution and have the user drag the app onto the “Applications” folder. Or use the Apple installer to install the application.

As for detecting translocation, this code is what I’ve used.

if left( app.executableFile.nativePath, 9 ) = "/private/" then rvalue.append "?? Translocated"

I would suggest that you send these customers a version using the above method (signed DMG) and include the translocation detection code in your e-mail feedback routine. Then ask the customers if they continue to have this problem, to use your e-mail feedback function so that it can collect this data.

[quote]
Maybe on the second run, but not on the first.[/quote]
Interesting

I do exactly that.

Good plan, thanks.

2 people who were reporting slowness now say all is running well.
I have been advising dragging to the desktop, then dragging back to applications, and restarting the machine.
I think its the latter that did it, but after several ‘try this try thats’ Im not sure which thing is the golden ticket.

The fact that one day the app runs like molasses and the next its fine , proves the code and the app are OK, I feel.

Other possible causes:
One user tells me that the app was ‘in the cloud’ - will iCloud really take an application onto the iCloud area and ‘run it from there’?
And how much overhead is there on accessing ‘files that have been moved to iCloud’ instead of being local only?

[quote=400349:@Jeff Tullin]One user tells me that the app was ‘in the cloud’ - will iCloud really take an application onto the iCloud area and ‘run it from there’?
And how much overhead is there on accessing ‘files that have been moved to iCloud’ instead of being local only?[/quote]
From poking around with iCloud; I can tell you that all the files were being stored locally and only mirrored via the cloud.

This may have changed with newer OS releases.

The other thing that most people don’t realise is that Apple tried to auto backup files and folders from the desktop to iCloud, it might be that the application is really slow while it’s transferring the data online, or that running the application is updating the meta data on the file system and this is triggering a re-upload?

On one hand I think it’s great that Apple are auto backing up user files, as many users don’t. But on the other hand I dislike it, because it pushes people over their FREE 5gb of cloud space very quickly and often people don’t really understand why, except to make the dialogs go away you either start paying Apple a monthly free or disable the feature.

[quote=400356:@Sam Rowlands]From poking around with iCloud; I can tell you that all the files were being stored locally and only mirrored via the cloud.

This may have changed with newer OS releases.

The other thing that most people don’t realise is that Apple tried to auto backup files and folders from the desktop to iCloud, it might be that the application is really slow while it’s transferring the data online, or that running the application is updating the meta data on the file system and this is triggering a re-upload?

On one hand I think it’s great that Apple are auto backing up user files, as many users don’t. But on the other hand I dislike it, because it pushes people over their FREE 5gb of cloud space very quickly and often people don’t really understand why, except to make the dialogs go away you either start paying Apple a monthly free or disable the feature.[/quote]
That’s a great reason not to copy to the Desktop first.

FWIW, we found that copying to anywhere other than the Applications folder caused translocation issues.

Also, Make sure that both your app and your dmg are signed.

Definitely done.