Java自带HttpClient下载CPU占用过高

0

下载HTTP协议没有问题,下载HTTPS协议的时候CPU一直维持在20%-30%左右。
升级到JDK15问题依旧存在。

"Snail-Thread-HTTP-Client" #25 daemon prio=5 os_prio=0 cpu=216656.25ms elapsed=272.70s tid=0x0000024e34a84800 nid=0x3a68 runnable  [0x00000066085fd000]
   java.lang.Thread.State: RUNNABLE
	at com.sun.crypto.provider.GHASH.blockMult(java.base@11.0.2/GHASH.java:97)
	at com.sun.crypto.provider.GHASH.processBlock(java.base@11.0.2/GHASH.java:186)
	at com.sun.crypto.provider.GHASH.processBlocks(java.base@11.0.2/GHASH.java:236)
	at com.sun.crypto.provider.GHASH.update(java.base@11.0.2/GHASH.java:198)
	at com.sun.crypto.provider.GaloisCounterMode.doLastBlock(java.base@11.0.2/GaloisCounterMode.java:401)
	at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(java.base@11.0.2/GaloisCounterMode.java:561)
	at com.sun.crypto.provider.CipherCore.finalNoPadding(java.base@11.0.2/CipherCore.java:1116)
	at com.sun.crypto.provider.CipherCore.fillOutputBuffer(java.base@11.0.2/CipherCore.java:1053)
	at com.sun.crypto.provider.CipherCore.doFinal(java.base@11.0.2/CipherCore.java:941)
	at com.sun.crypto.provider.AESCipher.engineDoFinal(java.base@11.0.2/AESCipher.java:491)
	at javax.crypto.CipherSpi.bufferCrypt(java.base@11.0.2/CipherSpi.java:779)
	at javax.crypto.CipherSpi.engineDoFinal(java.base@11.0.2/CipherSpi.java:730)
	at javax.crypto.Cipher.doFinal(java.base@11.0.2/Cipher.java:2497)
	at sun.security.ssl.SSLCipher$T12GcmReadCipherGenerator$GcmReadCipher.decrypt(java.base@11.0.2/SSLCipher.java:1613)
	at sun.security.ssl.SSLEngineInputRecord.decodeInputRecord(java.base@11.0.2/SSLEngineInputRecord.java:240)
	at sun.security.ssl.SSLEngineInputRecord.decode(java.base@11.0.2/SSLEngineInputRecord.java:197)
	at sun.security.ssl.SSLEngineInputRecord.decode(java.base@11.0.2/SSLEngineInputRecord.java:160)
	at sun.security.ssl.SSLTransport.decode(java.base@11.0.2/SSLTransport.java:108)
	at sun.security.ssl.SSLEngineImpl.decode(java.base@11.0.2/SSLEngineImpl.java:672)
	at sun.security.ssl.SSLEngineImpl.readRecord(java.base@11.0.2/SSLEngineImpl.java:627)
	at sun.security.ssl.SSLEngineImpl.unwrap(java.base@11.0.2/SSLEngineImpl.java:443)
	- locked <0x00000000840012d0> (a sun.security.ssl.SSLEngineImpl)
	at sun.security.ssl.SSLEngineImpl.unwrap(java.base@11.0.2/SSLEngineImpl.java:422)
	- locked <0x00000000840012d0> (a sun.security.ssl.SSLEngineImpl)
	at javax.net.ssl.SSLEngine.unwrap(java.base@11.0.2/SSLEngine.java:634)
	at jdk.internal.net.http.common.SSLFlowDelegate$Reader.unwrapBuffer(java.net.http@11.0.2/SSLFlowDelegate.java:480)
	at jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(java.net.http@11.0.2/SSLFlowDelegate.java:389)
	- locked <0x0000000084009258> (a java.lang.Object)
	at jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(java.net.http@11.0.2/SSLFlowDelegate.java:263)
	at jdk.internal.net.http.common.SequentialScheduler$SynchronizedRestartableTask.run(java.net.http@11.0.2/SequentialScheduler.java:175)
	- locked <0x00000000840090b0> (a java.lang.Object)
	at jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(java.net.http@11.0.2/SequentialScheduler.java:147)
	at jdk.internal.net.http.common.SequentialScheduler$TryEndDeferredCompleter.complete(java.net.http@11.0.2/SequentialScheduler.java:315)
	at jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(java.net.http@11.0.2/SequentialScheduler.java:149)
	at jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(java.net.http@11.0.2/SequentialScheduler.java:198)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.2/ThreadPoolExecutor.java:1128)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.2/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.2/Thread.java:834)

我直接启动JAR发现没有问题,只有使用Eclipse启动的时候有问题。
最后发现原来是我在Eclipse启动的时候添加了一个JDK启动参数-Djava.compiler=NONE,禁用了JIT🥶🥶🥶