<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 09/27/2013 01:49 PM, Richard Carlsson wrote:
<blockquote cite="mid:524570D0.9040605@gmail.com" type="cite">The
inheritance mechanism in xmerl uses 'catch apply(M,F,Args)'
<br>
to try different modules M until one was found that had a function
<br>
F/A. However, when M:F/A does not exist, apply/3 will trap to
<br>
error_handler:undefined_function/3, which will call
code:ensure_loaded(M), making a synchronous request to the code
<br>
server process. If many processes tried to use xmerl:export()
<br>
concurrently, they would get serialized waiting for the code
server process.
<br>
<br>
This patch uses erlang:function_exported/3 instead to check if
M:F/A exists. If M exists, it should already have been loaded at
that point due to the inheritance checking in the
xmerl:callbacks/1 function.
<br>
<br>
git fetch <a class="moz-txt-link-abbreviated" href="mailto:git@github.com:richcarl/otp.git">git@github.com:richcarl/otp.git</a>
xmerl-avoid-code-server-serialization
<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/richcarl/otp/tree/xmerl-avoid-code-server-serialization">https://github.com/richcarl/otp/tree/xmerl-avoid-code-server-serialization</a>
<br>
<br>
<br>
/Richard
<br>
_______________________________________________
<br>
erlang-patches mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:erlang-patches@erlang.org">erlang-patches@erlang.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-patches">http://erlang.org/mailman/listinfo/erlang-patches</a>
<br>
</blockquote>
Hello Richard,<br>
I've created a pullrequest for your patch, which you can follow
here:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="https://github.com/erlang/otp/pull/87">https://github.com/erlang/otp/pull/87</a><br>
The patch will be run through initial tests and then be assigned to
be reviewed by responsible developers.<br>
Thanks,<br>
<br>
<pre class="moz-signature" cols="72">--
BR Fredrik Gustafsson
Erlang OTP Team</pre>
</body>
</html>