As Nmap's OS detection system has expanded over the years, to the point it now has more than 5,600 fingerprints, some of the algorithms are not scaling as well as they could be and performance has bogged down in some cases. We received a report recently with CPU graphs showing that OS detection seemed to be by far the most CPU intensive part of their scan. @dmiller-nmap has at least partially addressed this already, but I'm creating this issue to publicly document it and the fix.
As Nmap's OS detection system has expanded over the years, to the point it now has more than 5,600 fingerprints, some of the algorithms are not scaling as well as they could be and performance has bogged down in some cases. We received a report recently with CPU graphs showing that OS detection seemed to be by far the most CPU intensive part of their scan. @dmiller-nmap has at least partially addressed this already, but I'm creating this issue to publicly document it and the fix.