Announcement Announcement Module
Collapse
No announcement yet.
Why does roo seem to be waiting so much, and what is it waiting on? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why does roo seem to be waiting so much, and what is it waiting on?

    Frequently, when I submit a roo script on the roo cammand line, such as
    script --file D:\TRAROO\TRA024MVC1.roo
    nothing happens for some time (20 minutes to 2 hours).
    If I check the "Progress" tab in STS (2.8.1.RELEASE + updates), I see a message such as:
    Execute command 'script --file D:\TRAROO\TRA024MVC1.roo" pm [rpject 'LYN024' (Waiting)

    I have started putting roo "date" command at the beginning and end of scripts, and have found that they often do not start executing for 20 minutes to 2 hours after submission. On occasion, the script runns immediately, but not frequently.

    My situation: I get these results on several Intel I7 machines (with the 2nd fastest I7 chip), 16GB of memory, running Windows 7 Professional 64-bit, using 64-bit java 6.0.30 and 64-bit STS. The machines have either fast disks and/or SSD disks. And I'm using the latest STS and ROO versions (roo 1.2.1.RELEASE). I usually have "build automatically turned off, so it is not the Eclipse build that is taking time. What is large are my roo projects, which tend to have scripts containing 7000 to 8000 lines of roo script. Since last fall (fall 2011) when roo was sped up, my roo scripts take only 10 to 40 minutes to run, but then I can't use STS for another 20 minutes to 2 hours waiting for some background processing to complete. This situation also hold in both new projects (where some time is spent downloading maven dependencies) and existing projects where all dependencies exist in the project's lib already.

    So my questions are:
    What is it waiting on? Could it be roo scanning the code in the projects?

    How do you track active background jobs in STS (and Eclipse)? I've looked but havent found a way to see what is executing in the background.

    Is there a way to control the background jobs (e.g to pause them or cancel them). For example, it makes no sense to wait 2 hours for roo to scan the code if I am about to make significant changes to the code.

    Thanks in advance for any suggestions or insights.

    [BTW, last fall, the roo team did a great job of speeding up the execution of roo. (Some of my scripts dropped from taking 460 minutes to execute to 10 minutes - that is significant!) However, now my productivity is down since I seem to constantly be waiting for roo (or some unknown background task) to complete.]

  • #2
    I'm totally agree with you.
    Scalability problems at development time with ROO, may be.
    My model has around 750 entities with @RooJavaBean, @RooToString, @RooJpaActiveRecord, @RooEntity,@Table annotations... and all the *Roo*.aj files are previously generated.
    I launch only the Spring ROO stand-alone console ( without Eclipse, STS,.. ) and it takes ages with the message "Please wait still loading" at the right corner. The prompt "roo>" is there but it lets you only type a first command (for example: hint), and after that nothing more happens for a long, long time.
    I don't know what is Roo doing as there is no feedback, and whatever is doing it is not interruptable.
    It might be useful to know what is happening "inside" ...

    Best regards.

    PacoG.

    Comment


    • #3
      [BTW, last fall, the roo team did a great job of speeding up the execution of roo. (Some of my scripts dropped from taking 460 minutes to execute to 10 minutes - that is significant!) However, now my productivity is down since I seem to constantly be waiting for roo (or some unknown background task) to complete.]
      Roo does do a lot of scanning and the more entities you have the slower it will be. I don't know how many entities you have, but PacoG's project above has 750 entities, which though is not large by Java/JEE standards, is unfortunately for Roo to handle with good performance.

      We are looking at different ways of maintaining metadata for entities (which ultimately produces AspectJ ITDs), including a message-based queuing model.

      One thing you could try for me is to remove all the web controllers in your project, assuming you have them, and then start the Roo shell and run 'osgi ps' and also see if the shell is quicker

      Thanks
      Alan

      Comment


      • #4
        Hi,

        as expected the Roo shell is quicker without the web layer.
        It takes, on my machine 4Gb Pentium Dual Core 2.80Ghz WinXP, around 2 minutes to load and scan the model.

        FYI.

        roo.bat:

        @echo off
        setlocal enabledelayedexpansion

        set ROO_OPTS=-XX:PermSize=128m -XX:MaxPermSize=256m -Xms512m -Xmx1024m


        for %%? in ("%~dp0..") do set ROO_HOME=%%~f?
        rem echo Resolved ROO_HOME: "%ROO_HOME%"

        rem Build a classpath containing our two magical startup JARs
        for %%a in ("%ROO_HOME%\bin\*.jar") do set ROO_CP=!ROO_CP!%%a;

        rem Hop, hop, hop...
        java -Dflash.message.disabled=false -Djline.nobell=true %ROO_OPTS% -Droo.args="%*" -DdevelopmentMode=true -Dorg.osgi.framework.storage="%ROO_HOME%\cache" -Dfelix.auto.deploy.dir="%ROO_HOME%\bundle" -Dfelix.config.properties="file:%ROO_HOME%\conf\con fig.properties" -Droo.console.ansi=true -cp "%ROO_CP%" org.springframework.roo.bootstrap.Main
        rem echo Roo exited with code %errorlevel%

        :end


        roo metadata status
        ____ ____ ____
        / __ \/ __ \/ __ \
        / /_/ / / / / / / /
        / _, _/ /_/ / /_/ /
        /_/ |_|\____/\____/ 1.2.1.RELEASE [rev 6eae723]


        Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
        17 ms; 9856 call(s): org.springframework.roo.project.ProjectPathMonitor ingInitializer
        18 ms; 9856 call(s): org.springframework.roo.project.AutomaticProjectUp gradeService
        118 ms; 9856 call(s): org.springframework.roo.addon.web.mvc.jsp.JspMetad ataListener
        137 ms; 1588 call(s): org.springframework.roo.addon.layers.repository.mo ngo.RepositoryMongoMetadata
        138 ms; 1588 call(s): org.springframework.roo.addon.gwt.request.GwtReque stMetadata
        149 ms; 1588 call(s): org.springframework.roo.addon.layers.service.Servi ceInterfaceMetadata
        167 ms; 1588 call(s): org.springframework.roo.addon.layers.repository.mo ngo.MongoEntityMetadata
        187 ms; 1588 call(s): org.springframework.roo.addon.layers.repository.jp a.RepositoryJpaMetadata
        206 ms; 1588 call(s): org.springframework.roo.addon.equals.EqualsMetadat a
        215 ms; 1588 call(s): org.springframework.roo.addon.jsf.managedbean.JsfM anPlease wait - still loading
        217 ms; 1588 call(s): org.springframework.roo.addon.jsf.converter.JsfCon verterMetadata
        224 ms; 1588 call(s): org.springframework.roo.addon.solr.SolrMetadata
        228 ms; 1588 call(s): org.springframework.roo.addon.dod.DataOnDemandMeta data
        233 ms; 1588 call(s): org.springframework.roo.addon.jsf.application.JsfA pplicationBeanMetadata
        247 ms; 1588 call(s): org.springframework.roo.addon.web.mvc.controller.s caffold.WebScaffoldMetadata
        252 ms; 1588 call(s): org.springframework.roo.addon.property.editor.Edit orMetadata
        253 ms; 1588 call(s): org.springframework.roo.addon.jpa.identifier.Ident ifierMetadata
        261 ms; 1588 call(s): org.springframework.roo.addon.web.mvc.controller.c onverter.ConversionServiceMetadata
        266 ms; 1588 call(s): org.springframework.roo.addon.dbre.DbreMetadata
        268 ms; 1588 call(s): org.springframework.roo.addon.test.IntegrationTest Metadata
        281 ms; 1588 call(s): org.springframework.roo.addon.json.JsonMetadata
        285 ms; 1588 call(s): org.springframework.roo.addon.solr.SolrWebSearchMe tadata
        321 ms; 1588 call(s): org.springframework.roo.addon.serializable.Seriali zableMetadata
        322 ms; 1588 call(s): org.springframework.roo.addon.web.mvc.controller.f inder.WebFinderMetadata
        398 ms; 1588 call(s): org.springframework.roo.addon.web.mvc.controller.j son.WebJsonMetadata
        447 ms; 1588 call(s): org.springframework.roo.addon.javabean.JavaBeanMet adata
        455 ms; 1588 call(s): org.springframework.roo.addon.configurable.Configu rableMetadata
        533 ms; 1588 call(s): org.springframework.roo.addon.layers.service.Servi ceClassMetadata
        802 ms; 22745 call(s): org.springframework.roo.addon.layers.repository.mo ngo.MongoEntityMetadataProviderImpl
        894 ms; 9856 call(s): org.springframework.roo.addon.gwt.request.GwtReque stMetadataNotificationListener
        968 ms; 1588 call(s): org.springframework.roo.addon.gwt.scaffold.GwtScaf foldMetadataProviderImpl
        983 ms; 1588 call(s): org.springframework.roo.addon.gwt.locator.GwtLocat orMetadata
        1001 ms; 1588 call(s): org.springframework.roo.addon.gwt.proxy.GwtProxyMe tadata
        1869 ms; 22745 call(s): org.springframework.roo.addon.solr.SolrMetadataPro vider
        1871 ms; 22745 call(s): org.springframework.roo.addon.json.JsonMetadataPro vider
        1878 ms; 22745 call(s): org.springframework.roo.addon.solr.SolrWebSearchMe tadataProvider
        1924 ms; 22745 call(s): org.springframework.roo.addon.jsf.application.JsfA pplicationBeanMetadataProviderImpl
        1941 ms; 22745 call(s): org.springframework.roo.addon.web.mvc.controller.f inder.WebFinderMetadataProviderImpl
        1972 ms; 22745 call(s): org.springframework.roo.addon.serializable.Seriali zableMetadataProviderImpl
        2002 ms; 32601 call(s): org.springframework.roo.addon.dod.DataOnDemandMeta dataProviderImpl
        2055 ms; 22745 call(s): org.springframework.roo.addon.jpa.identifier.Ident ifierMetadataProviderImpl
        2258 ms; 32601 call(s): org.springframework.roo.addon.layers.repository.jp a.RepositoryJpaMetadataProviderImpl
        2675 ms; 22745 call(s): org.springframework.roo.addon.property.editor.Edit orMetadataProvider
        2713 ms; 22745 call(s): org.springframework.roo.addon.web.mvc.controller.c onverter.ConversionServiceMetadataProviderImpl
        2799 ms; 32601 call(s): org.springframework.roo.addon.test.IntegrationTest MetadataProviderImpl
        2836 ms; 32601 call(s): org.springframework.roo.addon.layers.repository.mo ngo.RepositoryMongoMetadataProviderImpl
        2876 ms; 32749 call(s): org.springframework.roo.addon.layers.service.Servi ceInterfaceMetadataProvider
        3079 ms; 22745 call(s): org.springframework.roo.addon.dbre.DbreMetadataPro viderImpl
        3176 ms; 36306 call(s): org.springframework.roo.addon.equals.EqualsMetadat aProviderImpl
        3231 ms; 32601 call(s): org.springframework.roo.addon.jsf.converter.JsfCon verterMetadataProviderImpl
        3394 ms; 1588 call(s): org.springframework.roo.addon.plural.PluralMetadat a
        3779 ms; 32601 call(s): org.springframework.roo.addon.web.mvc.controller.j son.WebJsonMetadataProviderImpl
        3841 ms; 32601 call(s): org.springframework.roo.addon.web.mvc.controller.s caffold.WebScaffoldMetadataProviderImpl
        4783 ms; 2329 call(s): org.springframework.roo.addon.plural.PluralMetadat aProviderImpl
        5022 ms; 32601 call(s): org.springframework.roo.addon.jsf.managedbean.JsfM anagedBeanMetadataProviderImpl
        5479 ms; 1588 call(s): org.springframework.roo.addon.tostring.ToStringMet adata
        9807 ms; 2 call(s): org.springframework.roo.project.MavenProjectMetada taProvider
        11373 ms; 32601 call(s): org.springframework.roo.addon.layers.service.Servi ceClassMetadataProvider
        11900 ms; 12185 call(s): org.springframework.roo.addon.javabean.JavaBeanMet adataProvider
        19044 ms; 101 call(s): org.springframework.roo.classpath.PhysicalTypeIden tifier
        25818 ms; 2037 call(s): org.springframework.roo.addon.jpa.activerecord.Jpa ActiveRecordMetadata
        26849 ms; 1588 call(s): org.springframework.roo.addon.finder.FinderMetadat a
        28935 ms; 6069 call(s): org.springframework.roo.classpath.DefaultPhysicalT ypeMetadataProvider
        30982 ms; 1588 call(s): org.springframework.roo.addon.gwt.scaffold.GwtScaf foldMetadata
        40080 ms; 2329 call(s): org.springframework.roo.addon.configurable.Configu rableMetadataProviderImpl
        52667 ms; 15149 call(s): org.springframework.roo.addon.tostring.ToStringMet adataProvider
        72774 ms; 3242 call(s): org.springframework.roo.addon.jpa.entity.JpaEntity MetadataProviderImpl
        77453 ms; 8468 call(s): org.springframework.roo.addon.jpa.activerecord.Jpa ActiveRecordMetadataProviderImpl
        89519 ms; 2037 call(s): org.springframework.roo.addon.jpa.entity.JpaEntity Metadata
        102626 ms; 16975 call(s): org.springframework.roo.addon.finder.FinderMetadat aProviderImpl
        org.springframework.roo.metadata.DefaultMetadataSe rvice:[validGets=1371896,recursiveGets=31361,cachePuts=38 631,cacheHits=797524,cacheMisses=574372,cacheEvict ions=534282,cacheCurrentSize=8166,cacheMaximumSize =100000]

        Comment


        • #5
          A new run with the osgi ps:

          roo osgi ps
          ____ ____ ____
          / __ \/ __ \/ __ \
          / /_/ / / / / / / /
          / _, _/ /_/ / /_/ /
          /_/ |_|\____/\____/ 1.2.1.RELEASE [rev 6eae723]


          Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
          START LEVEL 99
          ID State Level Name
          [ 0] [Active ] [ 0] System Bundle (3.2.2)
          [ 1] [Active ] [ 1] Commons Codec (1.6.0)
          [ 2] [Active ] [ 1] Commons IO (2.1.0)
          [ 3] [Active ] [ 1] Commons Lang (3.1.0)
          [ 4] [Active ] [ 1] jansi (1.6)
          [ 5] [Active ] [ 1] JLine (1.0.0.S2-B)
          [ 6] [Active ] [ 1] Apache Felix Bundle Repository (1.6.6)
          [ 7] [Active ] [ 1] Apache Felix iPOJO (1.8.0)
          [ 8] [Active ] [ 1] Apache Felix Log Service (1.0.1)
          [ 9] [Active ] [ 1] Apache Felix Declarative Services (1.6.0)
          [ 10] [Active ] [ 1] Apache Felix Shell Service (1.4.2)
          [ 11] [Active ] [ 1] Spring Roo - Addon - Backup (1.2.1.RELEASE)
          [ 12] [Active ] [ 1] Spring Roo - Addon - @Configurable (1.2.1.RELEASE)
          [ 13] [Active ] [ 1] Spring Roo - Addon - Creator (1.2.1.RELEASE) Please wait - still loadin
          [ 14] [Active ] [ 1] Spring Roo - Addon - Database Reverse Engineering (1.2.1.RELEASE)
          [ 15] [Active ] [ 1] Spring Roo - Addon - Test Data On Demand (1.2.1.RELEASE)
          [ 16] [Active ] [ 1] Spring Roo - Addon - Email (1.2.1.RELEASE)
          [ 17] [Active ] [ 1] Spring Roo - Addon - Equals/HashCode (1.2.1.RELEASE)
          [ 18] [Active ] [ 1] Spring Roo - Addon - Finder (1.2.1.RELEASE)
          [ 19] [Active ] [ 1] Spring Roo - Addon - Google Web Toolkit (1.2.1.RELEASE)
          [ 20] [Active ] [ 1] Spring Roo - Addon - JavaBean Method Manager (1.2.1.RELEASE)
          [ 21] [Active ] [ 1] Spring Roo - Addon - JDBC Driver Acquisition (1.2.1.RELEASE)
          [ 22] [Active ] [ 1] Spring Roo - Addon - JMS (1.2.1.RELEASE)
          [ 23] [Active ] [ 1] Spring Roo - Addon - JPA (1.2.1.RELEASE)
          [ 24] [Active ] [ 1] Spring Roo - Addon - JSF/PrimeFaces (1.2.1.RELEASE)
          [ 25] [Active ] [ 1] Spring Roo - Addon - JSON (1.2.1.RELEASE)
          [ 26] [Active ] [ 1] Spring Roo - Addon - JPA Repository Layer (1.2.1.RELEASE)
          [ 27] [Active ] [ 1] Spring Roo - Addon - MongoDB Repository Layer (1.2.1.RELEASE)
          [ 28] [Active ] [ 1] Spring Roo - Addon - Service Layer (1.2.1.RELEASE)
          [ 29] [Active ] [ 1] Spring Roo - Addon - Logging (1.2.1.RELEASE)
          [ 30] [Active ] [ 1] Spring Roo - Addon - OS Commands (1.2.1.RELEASE)
          [ 31] [Active ] [ 1] Spring Roo - Addon - Plural Details (1.2.1.RELEASE)
          [ 32] [Active ] [ 1] Spring Roo - Addon - Property Editor (1.2.1.RELEASE)
          [ 33] [Active ] [ 1] Spring Roo - Addon - Property Files (1.2.1.RELEASE)
          [ 34] [Active ] [ 1] Spring Roo - Addon - RooBot Client (1.2.1.RELEASE)
          [ 35] [Active ] [ 1] Spring Roo - Addon - Spring Security (1.2.1.RELEASE)
          [ 36] [Active ] [ 1] Spring Roo - Addon - java.io.Serializable (1.2.1.RELEASE)
          [ 37] [Active ] [ 1] Spring Roo - Addon - Solr (1.2.1.RELEASE)
          [ 38] [Active ] [ 1] Spring Roo - Addon - Automated Integration Testing (1.2.1.RELEASE)
          [ 39] [Active ] [ 1] Spring Roo - Addon - toString (1.2.1.RELEASE)
          [ 40] [Active ] [ 1] Spring Roo - Addon - Web - Flow (1.2.1.RELEASE)
          [ 41] [Active ] [ 1] Spring Roo - Addon - Web MVC Controller (1.2.1.RELEASE)
          [ 42] [Active ] [ 1] Spring Roo - Addon - Web MVC Embedded Extensions (1.2.1.RELEASE)
          [ 43] [Active ] [ 1] Spring Roo - Addon - Web MVC JSP View (1.2.1.RELEASE)
          [ 44] [Active ] [ 1] Spring Roo - Addon - Web Selenium Test Generator (1.2.1.RELEASE)
          [ 45] [Active ] [ 1] Spring Roo - Classpath (1.2.1.RELEASE)
          [ 46] [Active ] [ 1] Spring Roo - Classpath (JavaParser Implementation) (1.2.1.RELEASE)
          [ 47] [Active ] [ 1] Spring Roo - Felix Interoperability (1.2.1.RELEASE)
          [ 48] [Active ] [ 1] Spring Roo - File Monitor (1.2.1.RELEASE)
          [ 49] [Active ] [ 1] Spring Roo - File Monitor - Polling (1.2.1.RELEASE)
          [ 50] [Active ] [ 1] Spring Roo - File Monitor - Polling (Roo Launcher) (1.2.1.RELEASE)
          [ 51] [Active ] [ 1] Spring Roo - File Undo (1.2.1.RELEASE)
          [ 52] [Active ] [ 1] Spring Roo - Metadata (1.2.1.RELEASE)
          [ 53] [Active ] [ 1] Spring Roo - Model (1.2.1.RELEASE)
          [ 54] [Active ] [ 1] Spring Roo - Process Manager (1.2.1.RELEASE)
          [ 55] [Active ] [ 1] Spring Roo - Project (1.2.1.RELEASE)
          [ 56] [Active ] [ 1] Spring Roo - Shell (1.2.1.RELEASE)
          [ 57] [Active ] [ 1] Spring Roo - Shell - JLine (1.2.1.RELEASE)
          [ 58] [Active ] [ 1] Spring Roo - Shell - JLine (OSGi Launcher) (1.2.1.RELEASE)
          [ 59] [Active ] [ 1] Spring Roo - Shell (OSGi Launcher) (1.2.1.RELEASE)
          [ 60] [Active ] [ 1] Spring Roo - OSGi Start Level Control (1.2.1.RELEASE)
          [ 61] [Active ] [ 1] Spring Roo - Support (1.2.1.RELEASE)
          [ 62] [Active ] [ 1] Spring Roo - Support for OSGi Features (1.2.1.RELEASE)
          [ 63] [Active ] [ 1] Spring Roo - User Agent Analysis (UAA) Integration (1.2.1.RELEASE)
          [ 64] [Active ] [ 1] Spring Roo - URL Stream API Contract (1.2.1.RELEASE)
          [ 65] [Active ] [ 1] Spring Roo - URL Stream - JDK (1.2.1.RELEASE)
          [ 66] [Active ] [ 1] Spring Roo - Wrapping - bcpg-jdk15 (1.45.0.0010)
          [ 67] [Active ] [ 1] Spring Roo - Wrapping - bcprov-jdk15 (1.45.0.0010)
          [ 68] [Active ] [ 1] Spring Roo - Wrapping - hapax (2.3.4.0010)
          [ 69] [Active ] [ 1] Spring Roo - Wrapping - inflector (0.7.0.0010)
          [ 70] [Active ] [ 1] Spring Roo - Wrapping - javaparser (1.0.7.0010)
          [ 71] [Active ] [ 1] Spring Roo - Wrapping - json-simple (1.1.0.0010)
          [ 72] [Active ] [ 1] Spring Roo - Wrapping - protobuf-java-lite (2.3.0.0001)
          [ 73] [Active ] [ 1] Spring User Agent Analysis - Client (1.0.2.RELEASE)

          Comment


          • #6
            Possibly a related issue, but not exactly what is being described...I often have to close my project and re-open it before the Roo shell will finish loading and give me a prompt. It will just sit there indefinitely otherwise.

            Just to clarify, this is when working with Roo shells in the STS.

            Comment

            Working...
            X