Java spring云配置服务器响应非常慢

Java spring云配置服务器响应非常慢,java,spring,spring-cloud-config,Java,Spring,Spring Cloud Config,我的SpringCloudConfig服务器对每个请求的响应都非常慢,并且 我找到的关键点调试日志在这里 2017-11-09 19:10:15,389org.springframework.core.env.PropertySourcesPropertyResolverFound key 'CommonProgramFiles(x86)' in [systemEnvironment] with type [String] 2017-11-09 19:**10:15,389**org.sprin

我的SpringCloudConfig服务器对每个请求的响应都非常慢,并且 我找到的关键点调试日志在这里

2017-11-09 19:10:15,389org.springframework.core.env.PropertySourcesPropertyResolverFound key 'CommonProgramFiles(x86)' in [systemEnvironment] with type [String]
2017-11-09 19:**10:15,389**org.springframework.core.env.PropertySourcesPropertyResolverFound key 'NUMBER_OF_PROCESSORS' in [systemEnvironment] with type [String]
2017-11-09 19:**10:16,764**org.springframework.core.env.StandardEnvironmentAdding [springCloudClientHostInfo] PropertySource with lowest search precedence
2017-11-09 19:10:16,765org.springframework.core.env.StandardEnvironmentAdding [random] PropertySource with search precedence immediately lower than [systemEnvironment]
对于单个请求,延迟约为1秒

下面是当我请求三次时使用Jprofiler的分析结果 ,由此我发现InetUtils需要很长时间,所以我在本地主机上测试了从github找到的源代码,速度非常慢

    try {
        int lowest = Integer.MAX_VALUE;
        for (Enumeration<NetworkInterface> nics = NetworkInterface
                .getNetworkInterfaces(); nics.hasMoreElements();) {
            NetworkInterface ifc = nics.nextElement();
            if (ifc.isUp()) {
                log.trace("Testing interface: " + ifc.getDisplayName());
                if (ifc.getIndex() < lowest || result == null) {
                    lowest = ifc.getIndex();
                }
                else if (result != null) {
                    continue;
                }

                // @formatter:off
                if (!ignoreInterface(ifc.getDisplayName())) {
                    for (Enumeration<InetAddress> addrs = ifc
                            .getInetAddresses(); addrs.hasMoreElements();) {
                        InetAddress address = addrs.nextElement();
                        if (address instanceof Inet4Address
                                && !address.isLoopbackAddress()
                                && !ignoreAddress(address)) {
                            log.trace("Found non-loopback interface: "
                                    + ifc.getDisplayName());
                            result = address;
                        }
                    }
                }
                // @formatter:on
            }
        }
    }
    catch (IOException ex) {
        log.error("Cannot get first non-loopback address", ex);
    }
试试看{
int lowest=整数最大值;
对于(枚举NIC=网络接口)
.getNetworkInterfaces();nics.hasMoreElements();){
NetworkInterface ifc=nics.nextElement();
如果(ifc.isUp()){
log.trace(“测试接口:+ifc.getDisplayName());
if(ifc.getIndex()

有人知道为什么吗?

哪个云服务用于托管配置服务器?@ajc,我在本地主机中测试它,并在LAN中使用git存储库。哪个云服务用于托管配置服务器?@ajc,我在本地主机中测试它,并在LAN中使用git存储库。