STS是非常缓慢的重建工作空间

时间:2015-03-09 19:53:02

标签: sts-springsourcetoolsuite

即使在项目中禁用了Spring构建器和验证器,STS在重建工作区时也非常缓慢。我通常会在从git更新repo时看到这个,然后在项目上点击“刷新”。发生的事情是有几个线程运行BeansConfig.executePostProcessor,其中一个活动的线程(下面的示例堆栈跟踪)和UrlResourceFinder.findResource上的其他几个BLOCKED。有没有办法避免STS一次等待几分钟?

"Background Thread-41 (Spring IDE/3.6.3)" daemon prio=6 tid=0x54499800 nid=0x45e4 runnable [0x5e79e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.WinNTFileSystem.getLastModifiedTime(Native Method)
        at java.io.File.lastModified(File.java:937)
        at org.apache.xbean.classloader.NonLockingJarFile.clearJarEntryCacheIfFileHasChanged(NonLockingJarFile.java:147)
        at org.apache.xbean.classloader.NonLockingJarFile.getJarEntryCache(NonLockingJarFile.java:157)
        at org.apache.xbean.classloader.NonLockingJarFile.getJarEntry(NonLockingJarFile.java:213)
        at org.apache.xbean.classloader.JarResourceLocation.getResourceHandle(JarResourceLocation.java:42)
        at org.apache.xbean.classloader.UrlResourceFinder.findResource(UrlResourceFinder.java:115)
        - locked <0x2b0000d0> (a java.lang.Object)
        at org.apache.xbean.classloader.JarFileClassLoader$3.run(JarFileClassLoader.java:220)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.xbean.classloader.JarFileClassLoader.findResource(JarFileClassLoader.java:218)
        at org.springframework.ide.eclipse.core.java.ProjectClassLoaderCache$FilteringNonLockingJarFileClassLoader.findResource(ProjectClassLoaderCache.java:517)
        at org.apache.xbean.classloader.MultiParentClassLoader.getResource(MultiParentClassLoader.java:266)
        at org.springframework.ide.eclipse.core.java.ProjectClassLoaderCache$FilteringNonLockingJarFileClassLoader.getResource(ProjectClassLoaderCache.java:529)
        at org.apache.xbean.classloader.MultiParentClassLoader.getResource(MultiParentClassLoader.java:252)
        at org.springframework.ide.eclipse.core.java.ProjectClassLoaderCache$FilteringNonLockingJarFileClassLoader.getResource(ProjectClassLoaderCache.java:529)
        at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:227)
        at org.springframework.ide.eclipse.core.java.ProjectClassLoaderCache$FilteringNonLockingJarFileClassLoader.getResourceAsStream(ProjectClassLoaderCache.java:535)
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:155)
        at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:67)
        at org.springframework.ide.eclipse.core.type.asm.CachingClassReaderFactory.getClassReader(CachingClassReaderFactory.java:61)
        - locked <0x34c412f8> (a java.util.HashMap)
        at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:63)
        at org.springframework.ide.eclipse.core.java.classreading.JdtConnectedMetadataReader.<init>(JdtConnectedMetadataReader.java:42)
        at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:53)
        at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38)
        - locked <0x34c41340> (a java.util.HashMap)
        at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:73)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:274)
        at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:765)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:751)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcess(BeansConfig.java:634)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.access$8(BeansConfig.java:593)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:453)
        at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

0 个答案:

没有答案