<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi everyone,<o:p></o:p></p>
<p class="MsoNormal">I’d like to propose a patch to fix a performance issue with enumerating network interfaces on Windows. The problem stems from the fact that getAll calls createNetworkInterface for every interface, but does not pass the list of interfaces
 that it has already collected. As a result, createNetworkInterface gets the entire list all over again.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When the number of interfaces is large, this can become very slow. On my machine, there are almost 100 “interfaces” (most of which are really filters). With the current code, a call to NetworkInterface#getNetworkInterfaces() takes ~600
 ms. My patch cuts it down to ~15 ms.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is the first time I’ve tried to contribute to OpenJDK, so I’m looking for someone to guide me through the process of getting this patch merged. I’ve already gotten The Powers That Be at my company to sign the OCA.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d also like to get your thoughts on a possible second patch that would be more extensive and might contain some functional changes. The current code is a little messy and uses some ancient APIs. Some initial experiments suggest that newer
 APIs (available since Vista/Server 2008) would be faster. The current code also invents its own interface naming scheme. Windows now has APIs for that (e.g. ConvertInterfaceLuidToNameW), but switching to those would obviously mean that getName() would return
 a different value than it does today. getByName() would also need to be adjusted, but I could code it such that it tries the Windows APIs first and then falls back to the existing code, in order to minimize breakage. So, given those caveats, do you think such
 a patch would have any chance of being accepted? Or would any breaking changes be a no-go?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoTableGrid" border="0" cellspacing="0" cellpadding="0" width="672" style="border-collapse:collapse;border:none">
<tbody>
<tr style="height:22.55pt;mso-height-rule:exactly">
<td width="90" rowspan="2" style="width:67.5pt;border:none;border-right:solid #005383 1.0pt;padding:0in 5.4pt 0in 5.4pt;height:22.55pt;mso-height-rule:exactly">
<p class="MsoNormal"><span style="font-size:10.0pt"><a href="http://www.scientificgames.com/"><span style="font-family:"Arial",sans-serif;color:windowtext;text-transform:uppercase;text-decoration:none"><img border="0" width="66" height="60" style="width:.6875in;height:.625in" id="Picture_x0020_12" src="cid:image001.png@01D93AFD.EA4CF830" alt="Logo

Description automatically generated"></span></a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></p>
</td>
<td width="580" style="width:434.7pt;border:none;padding:0in 5.4pt 0in 5.4pt;height:22.55pt;mso-height-rule:exactly">
<p class="MsoNormal" style="margin-left:8.2pt"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#005383">Rich DiCroce</span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#005383"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:8.2pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Senior Advanced Solutions Architect<u><span style="text-transform:uppercase"><o:p></o:p></span></u></span></p>
</td>
<td style="border:none;padding:0in 0in 0in 0in" width="2">
<p class="MsoNormal"> </p>
</td>
</tr>
<tr style="height:.5in">
<td width="580" style="width:434.7pt;border:none;padding:0in 5.4pt 0in 5.4pt;height:.5in">
<p class="MsoNormal" style="margin-left:8.2pt"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Scientific Games<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:8.2pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:8.2pt"><u><span style="font-size:9.0pt;font-family:"Arial",sans-serif;text-transform:uppercase"><o:p><span style="text-decoration:none"> </span></o:p></span></u></p>
</td>
<td style="border:none;padding:0in 0in 0in 0in" width="2">
<p class="MsoNormal"> </p>
</td>
</tr>
<tr style="height:22.5pt">
<td width="672" colspan="3" style="width:7.0in;padding:0in 5.4pt 0in 5.4pt;height:22.5pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#005383;text-transform:uppercase">HAVE FUN. DO GOOD.
<b>PLAY HEALTHY.</b></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:18.45pt">
<td width="672" colspan="3" style="width:7.0in;padding:0in 5.4pt 0in 5.4pt;height:18.45pt">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#A6A6A6">May be privileged. May be confidential. Please delete if not the addressee.</span><u><span style="font-size:10.0pt;font-family:"Arial",sans-serif;text-transform:uppercase"><o:p></o:p></span></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>