Details

    • Type: Sub-task Sub-task
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: 3.3.0.RC2
    • Component/s: EDITING
    • Labels:
      None

      Description

      I have to wait >10 seconds until sts finished loading a single context-xml. This happens after each java-editor save in the project. It's not usable. I don't know when this problem occured first time ... it older versions of STS I don't have this effect. Can someone please check/explain what happens during this "application-context-xml-loading".

      1. jstack.txt
        63 kB
        Jason Erickson
      2. jstack.txt
        50 kB
        Jason Erickson
      3. jstack2.txt
        63 kB
        Jason Erickson
      4. jstack3.txt
        63 kB
        Jason Erickson
      5. jstack4.txt
        62 kB
        Jason Erickson

        Activity

        Hide
        Jason Erickson added a comment -

        Some (attempts at) answers to Martin's questions:

        • How is the dependency between the problematic project and the other projects defined? Just via project dependencies in Eclipse/STS (Java Build Path settings)?
          • I'm not sure I understand the question completely, but basically, I have several Maven modules that I import. This import adds project dependencies for me, so I'm letting m2e do the work, but if I check the build path, the dependencies I would expect are there.
        • And do you have dependencies between that project and the others on the spring context definitions as well?
          • Again, not sure if I understand, but I definitely have spring context files that reference classes from dependent projects.
        • If so, via the Spring context "import" statement in the xml file or somehow different?
          • I do use "import" statements but only for context files in the same project. I don't reference any spring context files from other projects within a spring context file by import or anything like that, if that's what you're getting at.
        • And what triggers the big delay? I guess you have "build automatically" activated, but is this delay caused by a change in some file and then the auto-build kicks in and causes everything to slow down?
          • That's correct
        Show
        Jason Erickson added a comment - Some (attempts at) answers to Martin's questions: How is the dependency between the problematic project and the other projects defined? Just via project dependencies in Eclipse/STS (Java Build Path settings)? I'm not sure I understand the question completely, but basically, I have several Maven modules that I import. This import adds project dependencies for me, so I'm letting m2e do the work, but if I check the build path, the dependencies I would expect are there. And do you have dependencies between that project and the others on the spring context definitions as well? Again, not sure if I understand, but I definitely have spring context files that reference classes from dependent projects. If so, via the Spring context "import" statement in the xml file or somehow different? I do use "import" statements but only for context files in the same project. I don't reference any spring context files from other projects within a spring context file by import or anything like that, if that's what you're getting at. And what triggers the big delay? I guess you have "build automatically" activated, but is this delay caused by a change in some file and then the auto-build kicks in and causes everything to slow down? That's correct
        Hide
        Jason Erickson added a comment -

        I will say that the annoying delay comes when I have to do multiple saves. So, I save a file, which kicks of a build, part of which is this "Loading xxxContext.xml" stuff but that's running in the background. In the meantime, I make a couple of other changes and try to save again, but now I get the popup dialog showing me the progress on "Loading xxxContext.xml" that has to complete before it can complete my save operation.

        Show
        Jason Erickson added a comment - I will say that the annoying delay comes when I have to do multiple saves. So, I save a file, which kicks of a build, part of which is this "Loading xxxContext.xml" stuff but that's running in the background. In the meantime, I make a couple of other changes and try to save again, but now I get the popup dialog showing me the progress on "Loading xxxContext.xml" that has to complete before it can complete my save operation.
        Hide
        Andreas Höhmann added a comment -

        I guess the hanging bean-xml validation has nothing to do with multi module projects etc.

        In the stacktrace we can see the situation:

        "Background Thread-36 (Spring IDE/3.0.0)" daemon prio=6 tid=0x504c2400 nid=0x2e4 runnable [0x549ee000]
        java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)

        • locked <0x0e850088> (a java.net.SocksSocketImpl)
          at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
          at java.net.PlainSocketImpl.connect(Unknown Source)
          at java.net.SocksSocketImpl.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at sun.net.NetworkClient.doConnect(Unknown Source)
          at sun.net.www.http.HttpClient.openServer(Unknown Source)
          at sun.net.www.http.HttpClient.openServer(Unknown Source)
        • locked <0x0e8501c8> (a sun.net.www.http.HttpClient)
          at sun.net.www.http.HttpClient.<init>(Unknown Source)
          at sun.net.www.http.HttpClient.New(Unknown Source)
          at sun.net.www.http.HttpClient.New(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
          at org.eclipse.wst.internet.cache.internal.Cache.refreshCacheEntry(Cache.java:286)
          at org.eclipse.wst.internet.cache.internal.Cache.getResource(Cache.java:144)
          at org.eclipse.wst.internet.cache.internal.CacheURIResolverExtension.resolve(CacheURIResolverExtension.java:44)
          at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolvePhysicalLocation(ExtensibleURIResolver.java:112)
          at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.XmlCatalogDelegatingEntityResolver.resolveEntity(XmlCatalogDele
          gatingEntityResolver.java:87)
          at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
          at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
          at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
          at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

        How can we solve this?

        1. org.eclipse.wst.internet.cache.*** seems to ignore my proxy configuration

        a) General>NetworkConnections>Manual>localhost:3128

        b) eclipse.ini
        -Djava.net.useSystemProxies=false
        -Dhttp.nonProxyHosts="localhost|127.0.0.1"
        -Dhttp.proxyHost=localhost
        -Dhttp.proxyPort=3128
        -Dhttps.proxyHost=localhost
        -Dhttps.proxyPort=3128

        2. maybe I'm using a wrong xsd schema location (I guess not)

        <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd">

        3. idea: sts can contain all spring related xsd's or search/find the xsd's in the classpath

        regards
        andreas

        Show
        Andreas Höhmann added a comment - I guess the hanging bean-xml validation has nothing to do with multi module projects etc. In the stacktrace we can see the situation: "Background Thread-36 (Spring IDE/3.0.0)" daemon prio=6 tid=0x504c2400 nid=0x2e4 runnable [0x549ee000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) locked <0x0e850088> (a java.net.SocksSocketImpl) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) locked <0x0e8501c8> (a sun.net.www.http.HttpClient) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at org.eclipse.wst.internet.cache.internal.Cache.refreshCacheEntry(Cache.java:286) at org.eclipse.wst.internet.cache.internal.Cache.getResource(Cache.java:144) at org.eclipse.wst.internet.cache.internal.CacheURIResolverExtension.resolve(CacheURIResolverExtension.java:44) at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolvePhysicalLocation(ExtensibleURIResolver.java:112) at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.XmlCatalogDelegatingEntityResolver.resolveEntity(XmlCatalogDele gatingEntityResolver.java:87) at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) How can we solve this? 1. org.eclipse.wst.internet.cache.*** seems to ignore my proxy configuration a) General>NetworkConnections>Manual>localhost:3128 b) eclipse.ini -Djava.net.useSystemProxies=false -Dhttp.nonProxyHosts="localhost|127.0.0.1" -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128 2. maybe I'm using a wrong xsd schema location (I guess not) <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd "> 3. idea: sts can contain all spring related xsd's or search/find the xsd's in the classpath regards andreas
        Hide
        Martin Lippert (c) added a comment -

        Thanks for the stack trace. The general XSD lookup mechanism is implemented to that is looks at the classpath of your project, but it also consults the XML catalog of WTP.
        Can you post the rest of the stack trace as well, so that I can see where this call is coming from?

        Show
        Martin Lippert (c) added a comment - Thanks for the stack trace. The general XSD lookup mechanism is implemented to that is looks at the classpath of your project, but it also consults the XML catalog of WTP. Can you post the rest of the stack trace as well, so that I can see where this call is coming from?
        Hide
        Martin Lippert (c) added a comment -

        I am closing this report now. We worked a lot on performance in this area and improved the overall speed of loading Spring context files significantly. If you observe additional slowdowns or performance issues, please open new issues and attach thread dumps, if possible. We will continue to work on performance and already have a number of additional items open to capture specific areas for further improvements. Please feel free to add additional findings.

        Show
        Martin Lippert (c) added a comment - I am closing this report now. We worked a lot on performance in this area and improved the overall speed of loading Spring context files significantly. If you observe additional slowdowns or performance issues, please open new issues and attach thread dumps, if possible. We will continue to work on performance and already have a number of additional items open to capture specific areas for further improvements. Please feel free to add additional findings.

          People

          • Assignee:
            Martin Lippert (c)
            Reporter:
            Andreas Höhmann
          • Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: