Benches macOS

5

update_dyld_shared_cache

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I've moved a few applications from /Applications into subdirectories, and noticed that my console log whines about this.

I noticed that /var/db/dyld/shared
regionroots/Applications.paths has several applications listed in there, with the original absolute paths to the executables. (More apple inflexibility). Anyway, I fixed these to reflect the actual locations.

I also added a few more to a new file I made and stuck into the same directory. I then issued the command

sudo updatedyld_sharedcache -force

It may be my imagination, but these things now seem to launch a lot faster.

I'm stumbling around in the unlit basement of ignorance. Apart from the man page, can anyone explain what is going on, in terms of dyld cacheing or whatever. Is this really making stuff launch faster, and why not put every commonly-used application in there?

I noticed it listed /bin/sh and /bin/bash. I put /bin/zsh in the list, and also the iTerm executable, and I swear it works better, but I could be delusional.

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Mark Jalbert

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Well Bill, either we are smoking the same stuff or you're on to something. zsh opens brighter in the Terminal.app and Firefox which took an eternity to open, now opens respectfully. Now, if only those macfixit folks could figure out how to edit /var/db/dyld/sharedregionroots/Applications.paths...:- )

  2. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Unfortunately, I can't seem to get it to work for paths with spaces or other special characters in them, either escaping or quoting.

  3. 0

    Mark Jalbert

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Have you tried to set the IFS to newline? That might help with the paths with spaces.

  4. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You mean, put n in there for a space?

  5. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    So it turns out the trick was to NOT escape the spaces, which is I think a minor variant (at most) to what you were suggesting. So this appears to work, for example:

    /Applications/Adobe/Adobe Photoshop CS3/Adobe Photoshop CS3.app/Contents/MacOS/Adobe Photoshop CS3