<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Win:</div>
<div class=""><br class="">
</div>
Thanks. And to take this one step further, I downloaded the latest nightly build and signed it using a self-signed certificate.  Here’s what I did:
<div class=""><br class="">
</div>
<div class="">1. Create a self-signed certificate following the directions at<br class="">
<div class=""><br class="">
</div>
<div class=""><a href="https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html" class="">https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html</a></div>
<div class=""><br class="">
</div>
<div class="">Follow the link "To obtain a self-signed certificate using Certificate Assistant”.  After completing those steps, the certificate is now stored in your Keychain.</div>
<div class=""><br class="">
</div>
<div class="">2.  From the Terminal, use codesign to sign the app.</div>
<div class=""><br class="">
</div>
<div class="">codesign -s “name_of_the_certificate”  --deep Aquamacs.app</div>
<div class=""><br class="">
</div>
<div class="">The external files now open instantly, as they should.</div>
<div class=""><br class="">
</div>
<div class="">To distribute the signed app, you should probably use a certificate signed by a reputable authority.  But this worked for me for personal use.</div>
<div class=""><br class="">
</div>
<div class="">Michael</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 21, 2019, at 1:25 PM, Win Treese <<a href="mailto:treese@acm.org" class="">treese@acm.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Here’s an experiment I did:<br class="">
<br class="">
1. Create a file called /tmp/foo.html with the text “hello”<br class="">
2. Run “open /tmp/foo.html” in the Terminal -> opens immediately in Safari<br class="">
3. Run Aquamacs 3.4 distributed release version (which is signed)<br class="">
   a. run M-x shell<br class="">
   b. run “open /tmp/foo.html” in the shell inside Aquamacs<br class="">
   -> opens immediately in Safari<br class="">
4. Run Aquamacs nightly build<br class="">
   a. run M-x shell<br class="">
   b. run “open /tmp/foo.html” in the shell inside Aquamacs<br class="">
   -> opens after a noticeable delay in Safari<br class="">
<br class="">
While I was doing the experiments, I watched the logs in the Console.app. In #4, there is a lot of chatter about the trust subsystem. The messages are mysterious, but suggests that the trust subsystem is having a minor freakout over access privileges, after
 which it lets things go ahead anyway.<br class="">
<br class="">
It’s hard to tell what’s going on, or what Apple’s intent for this scenario is. But it seems pretty clear that this is what’s causing the performance problem.<br class="">
<br class="">
The simplest answer would be to use a signed binary, and I hope we’ll have one with the TLS changes in available soon.<br class="">
<br class="">
- Win<br class="">
<br class="">
<blockquote type="cite" class="">On Jul 16, 2019, at 9:59 AM, Braun, Michael <<a href="mailto:braunm@mail.smu.edu" class="">braunm@mail.smu.edu</a>> wrote:<br class="">
<br class="">
Thanks.  I can confirm this behavior on my computer as well.  The release version ran as it should.  The nightly build behaved as it should when run as a binary from the Terminal, but not when launched through the GUI.<br class="">
<br class="">
<br class="">
I did run into the following issues, however.<br class="">
<br class="">
1.  When running the app directly from Terminal, Aquamacs was looking for libTIFF.dylib, libJPEG.dylib and libPng.dylib in /usr/local/lib.  Those files were not there, but among the System files.  Once I added symlinks, the application was able to launch, and
 files would open instantly, as they should. But this did not solve the problem when launching from the GUI.<br class="">
<br class="">
2.  Even though the app does launch and run from the Terminal, I got the following error
<br class="">
<br class="">
mbraun: ~/Downloads $ ./Aquamacs.app/Contents/MacOS/Aquamacs <br class="">
2019-07-16 08:50:15.131 Aquamacs[25407:8580522] Failed to initialize color list unarchiver: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver"
 UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver}<br class="">
<br class="">
It didn’t seem to affect running of the app, at least in my short test.  But maybe that’s relevant.<br class="">
<br class="">
3.  As stated earlier in this thread, I cannot build Aquamacs on my own at the moment.  Also, I do not do much developing, so I’m not sure what’s involved in signing an application.  So unfortunately I cannot test that.<br class="">
<br class="">
But it does appear that seeing if signing the nightly build would be the next step in debugging this.<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On Jul 15, 2019, at 9:07 PM, Jamie Taylor <<a href="mailto:Jamie.Taylor@pobox.com" class="">Jamie.Taylor@pobox.com</a>> wrote:<br class="">
<br class="">
I attempted to send this a month ago, but the list mail server rejected it, and I didn't get around to sending it again from a different source.  I'd be interested to know if any of this helps.<br class="">
<br class="">
----<br class="">
<br class="">
Some googling and brief experimentation has lead me to believe<br class="">
that this behavior is related to the code signature (or the lack<br class="">
thereof) on the application.  Specifically, I observed the<br class="">
following three data points:<br class="">
<br class="">
The current released version of Aquamacs, which is signed, does<br class="">
not exhibit this behavior.<br class="">
<br class="">
A nightly that I happened to have lying around (2018-02-23), which<br class="">
is not signed, does exhibit the slow "open" command behavior.<br class="">
<br class="">
However, if that same nightly is opened by running its binary<br class="">
directly rather than opening it as normal (i.e., running<br class="">
$  ~/Desktop/Aquamacs\ 2018-02-23\ nightly.app/Contents/MacOS/Aquamacs<br class="">
rather than double-clicking its icon), everything is speedy again.<br class="">
<br class="">
So my hypothesis is that if you either a) sign the app bundle that you<br class="">
built, or b) launch it by running the binary from the terminal rather<br class="">
than opening the app bundle, then you will get your speedy "open"<br class="">
behavior back.<br class="">
<br class="">
<br class="">
If anyone wants to go down the rabbit hole of trying to figure out<br class="">
why it works this way, here are a couple of search terms and links that<br class="">
might be of interest:  Mojave TCC, Attribution Chain<br class="">
<a href="https://github.com/macvim-dev/macvim/issues/763" class="">https://github.com/macvim-dev/macvim/issues/763</a><br class="">
https://eclecticlight.co/2019/02/01/solving-problems-with-mojaves-privacy-protection/ (the most interesting bits are in the comment thread)<br class="">
<br class="">
<br class="">
_____________________________________________________________<br class="">
MacOSX-Emacs mailing list<br class="">
MacOSX-Emacs@email.esm.psu.edu<br class="">
https://email.esm.psu.edu/mailman/listinfo/macosx-emacs<br class="">
List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx<br class="">
</blockquote>
<br class="">
<br class="">
_____________________________________________________________<br class="">
MacOSX-Emacs mailing list<br class="">
<a href="mailto:MacOSX-Emacs@email.esm.psu.edu" class="">MacOSX-Emacs@email.esm.psu.edu</a><br class="">
https://email.esm.psu.edu/mailman/listinfo/macosx-emacs<br class="">
List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx<br class="">
</blockquote>
<br class="">
<br class="">
_____________________________________________________________<br class="">
MacOSX-Emacs mailing list<br class="">
<a href="mailto:MacOSX-Emacs@email.esm.psu.edu" class="">MacOSX-Emacs@email.esm.psu.edu</a><br class="">
https://email.esm.psu.edu/mailman/listinfo/macosx-emacs<br class="">
List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
--------------------------<br class="">
Michael Braun, Ph.D.<br class="">
Associate Professor of Marketing, and<br class="">
  Corrigan Research Professor<br class="">
Cox School of Business<br class="">
Southern Methodist University<br class="">
Dallas, TX 75275<br class="">
<a href="mailto:braunm@smu.edu" class="">braunm@smu.edu</a></div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</body>
</html>