Another technique to consider wrt shortening profile names is to eschew the store's origin, which contributes to the length of the profile name. This would mean a (somewhat convoluted) privacy violation when installing snaps of the same name from different developers. Consider: install app foo from developer bar (today, creates app-specific dirs with foo.bar). Then user uninstalls foo from bar (which leaves data from the previous install) and installs foo from developer baz. If we don't create the app-specific dirs with foo.origin, then in this particular scenario, foo's data from the bar install is available to the baz install.
Another technique to consider wrt shortening profile names is to eschew the store's origin, which contributes to the length of the profile name. This would mean a (somewhat convoluted) privacy violation when installing snaps of the same name from different developers. Consider: install app foo from developer bar (today, creates app-specific dirs with foo.bar). Then user uninstalls foo from bar (which leaves data from the previous install) and installs foo from developer baz. If we don't create the app-specific dirs with foo.origin, then in this particular scenario, foo's data from the bar install is available to the baz install.