11 Replies Latest reply on Jul 12, 2008 11:29 AM by Pete Muir

    Long and Slow Turnaround: How fast is your development?

    Francisco Jose Peredo Noguez Master

      Hi!


      My computer has a Core Duo at 2.2 Ghz with 3Gb RAM and lots of free hard disk space. I have a Seam 2.0.2 project with around 25 entities, and around 100 pages, and it takes around 1.5 to 2.5 minutes to launch (from Eclipse Europa + JBoss Tools 2.1.1) and sometimes it takes much more (because Seam EL validators are extreamly slow, so if I don't cancel them manually (clicking the little red buttons) they take forever to run)


      A Cold Launch (running the project in the morning, after a clean all projects from eclipse , without anything previously copied in \server\default\deploy, and without interrupting the validators can take 5 or even 7 minutes)


      At the begining, it was a little faster reflecting changes (I think it was because of the support for  Seam and incremental hot deployment in WEB-INF/dev) but, a week later, when I had to checkout my project from other machine (from s svn repository) WEB-INF/dev just wasn't there (of course I didn't uploaded it in to the repository, I think that shouldn't be versioned?... should it? how can I re-enable it?


      Now, with WEB-INF/dev re-enabled (please tell me how), and if we ignore the slow execution of the validators in eclipse (after all we can cancel or disable them) I think most of the time is used initializing the JPA(Hibernate) entities (and that is still taking around 1.5 to 2.0 minutes).


      What can be done to make them faster? I have been playing with the idea of using Groovy to reduce re-deployment time... but I think that may the wrong way to attack this problem, after all, the EntityManagerFactory would need to re-read the annotation configuration to be able to deal with the changes, and using Groovy won't help me with that... or will it?


      What could be done? Are there plans to integrate Seam with Groovy GORM AFAIK it is able to dynamically reload partial changes on its persistence mapping configuration... Am I right? Is there a way to make Seam compatible with that?


      What other options do we have? Perhaps Jboss should just buy JavaRebel ZeroTurnaround, Opensource it and and integrate it with JBoss and Hibernate? ;-)


      How do people in this forum feel about the time that takes to redeploy stuff while developing? Where I work, there are other teams woking with, for example, PHP, or even with legacy Pre-Model 2 JSP architecture (just stuff everything in the .jsp file) and when they see the time it takes to see a change reflected on a page, they just wonder why I like to waste such a big amount of time. (Don't get me wrong, I understand the architectural advantages of Seam over Pre-Model 2 JSP architecture but it is really hard to argue about the advantages when their changes are reflected 0.5 seconds, and mine take 2 minutes)


      Regards,




        • 1. Re: Long and Slow Turnaround: How fast is your development?
          Daniel Roth Apprentice
          I think you might have left out one important factor: Your operating system and JVM. I can with quite good confidence say that it matters extremely.

          For instance, at home I have a computer similar to yours(AMD 6000+ w 2GB RAM), running Windows Vista with suns jvm 6, and it takes less than a minute for a cold start up a similar project.

          At work we only have Mac machines and whatever-java-comes-with-them. On non-intel servers, running java 1.5 and "extreme hardware specs" it takes ~1 minute to start Jboss AS with two or three applications. We can't have more than that because then the jvm crashes with some strange segfault in some com.apple class. (See below)

          At work I have a 24" intel iMac (those with everything in the monitor) and the hardware specs looks quite good. However, it took me less than a week to discover that it was to slow for development in Eclipse, and crashed hourly. To be honest, everything regarding eclipse development sucked. I installed ubuntu linux on the iMac and now it runs really smoothly, faster than my home computer ("1/4 of the price"). Or, at least for some hours. Then, due to the iMac having no fans and using laptop cpu's, the iMac becomes to hot and starts to step down in cpu-speed. At this time, usually around 2-3pm, I need to get the vacuum cleaner and suck out hot air of the machine and then let it rest for a while.

          Finally we have all sorts of MacBook Pro's, intel as well as non-intel. Developing in eclipse with them will make you need to restart your computer... (asking a co-worker) ... about ten times a day. I have installed Windows on my one and it runs perfectly.

          Since osx is running on some kind of bsd platform, which normally works fine with java, it must be something in the "apple" code. I guess the reason is two-fold. One is that all the "fluff-fluff" gui takes quite some cycles and the other that the bundled JVM for mac osx isn't very good.

          I would strongly suggest that if you are in the position where you may choose your OS for java dev, keep away from macosx and go with linux or windows.


          Thread 0 Crashed:
          0   <<00000000>>        0xfffeff18 objc_msgSend_rtp + 24
          1   com.apple.AppKit            0x93826b9c -[NSWindow _document:shouldClose:contextInfo:] + 68
          2   com.apple.AppKit            0x93788c4c -[NSApplication sendAction:to:from:] + 108
          3   com.apple.AppKit            0x93788b80 -[NSControl sendAction:to:] + 96
          4   com.apple.AppKit            0x93788a60 -[NSCell _sendActionFrom:] + 156
          5   com.apple.AppKit            0x937a2a88 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1020
          6   com.apple.AppKit            0x937a2670 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 564
          7   com.apple.AppKit            0x937a2094 -[NSControl mouseDown:] + 536

          Binary Images Description:
              0x1000 -     0xafff java    /usr/bin/java
          0x8fe00000 - 0x8fe51fff dyld 45.3       /usr/lib/dyld
          0x90000000 - 0x901bcfff libSystem.B.dylib       /usr/lib/libSystem.B.dylib
          0x90214000 - 0x90219fff libmathCommon.A.dylib   /usr/lib/system/libmathCommon.A.dylib
          • 2. Re: Long and Slow Turnaround: How fast is your development?
            Stacey Vetzal Newbie
            I usually deploy the app exploded, and manage my time between server-side and client-side work. This allows me to prep some code, and then experiment with wiring it into the template and tweaking CSS, supporting graphics, etc.

            Not ideal, but better than re-packaging and re-deploying all the time. Thanks to Facelets for hot reloading. And frankly I find most of our "experimenting" time (where we do the highest quantity of change/deploy cycles) is on the template / CSS side anyways. I do a full build maybe 1/4-1/8 of the time now.

            I use a merge tool to bring my changes back into the subversion repository (FileMerge on OSX, comes with XCode).

            Boot time is typically <30s for me, this is with the app I'm working on right now:

            2008-07-09 15:05:40,251 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 21s:528ms

            This is on a Macbook Pro, 2.4GHz Core 2 Duo. App performs well. If yours doesn't, start by making sure you have enough RAM (you're not swapping) and get onto a modern processor. RAM will likely kill you first loading up JBoss + IDE + other tools + OS.

            Oh, and I never bother bringing up JBoss from within the IDE. I find this a waste of time. They never handle hot-deploy right unless maybe it's a simple WAR project. And it slows it down.

            Ignore the MacOS sucks flamebait. Use what platform you like - I've not found an uncorrupted install of any popular OS to be unstable for Java development, in my shop we use them all.
            • 3. Re: Long and Slow Turnaround: How fast is your development?
              Toomas Romer Newbie

              Besides using JavaRebel the -client flag will increase the default startup speed. In development mode you won't need the -server JIT anyway IMHO. The run.sh of JBoss has -server by default.

              • 4. Re: Long and Slow Turnaround: How fast is your development?
                Pete Muir Master

                Daniel Roth wrote on Jul 09, 2008 11:13:


                Finally we have all sorts of MacBook Pro's, intel as well as non-intel. Developing in eclipse with them will make you need to restart your computer... (asking a co-worker) ... about ten times a day. I have installed Windows on my one and it runs perfectly.

                Since osx is running on some kind of bsd platform, which normally works fine with java, it must be something in the apple code. I guess the reason is two-fold. One is that all the fluff-fluff gui takes quite some cycles and the other that the bundled JVM for mac osx isn't very good.



                Well, my MacBook pro stays up for days with Eclipse, JBoss etc. running and survives any eclipse crash.


                Oh, and the Mac OS JVM is a port of the sun jvm for the non gui stuff.

                • 5. Re: Long and Slow Turnaround: How fast is your development?
                  Daniel Roth Apprentice
                  I'm quite sure many people have less problems with their Macs, however, as long as our problems persist on machines having well enough ram and cpu (everything works on the same HW but different operating system), I will stick to linux/windows on my personal apple machines.

                  Pete: I guess "com.apple.AppKit 0x93826b9c -[NSWindow _document:shouldClose:contextInfo:] + 68" could be some gui stuff. I have no idea why the JVM crashes with this error, just running Jboss AS. Is jboss AS using gui components? We see this JVM crash on our MacPro servers daily and are therefore installing linux on them.
                  • 6. Re: Long and Slow Turnaround: How fast is your development?
                    Francisco Jose Peredo Noguez Master

                    Hi!



                    Daniel Roth wrote on Jul 09, 2008 11:13:


                    I think you might have left out one important factor: Your operating system and JVM. I can with quite good confidence say that it matters extremely.



                    It is Windows XP SP2, jvm 1.5_14. (I have tried using jvm 6 but in my experience makes eclipse unstable)




                    For instance, at home I have a computer similar to yours (AMD 6000+ w 2GB RAM), running Windows Vista with suns jvm 6, and it takes less than a minute for a cold start up a similar project.



                    For me it takes about 1 minute if I configure it as a WAR, and around 2 minutes as an EAR (and a lot more if I wait for the validators) (IMHO way too slow, it just disrupts my mental flow)




                    I would strongly suggest that if you are in the position where you may choose your OS for java dev, keep away from macosx and go with linux or windows.



                    Working on windows... and I still feel it is way too slow, my put-everything-in-the-JSP friends have a turnaround time of 1 or 2 seconds.


                    How can I beat that?


                    Regards,


                    • 7. Re: Long and Slow Turnaround: How fast is your development?
                      Francisco Jose Peredo Noguez Master

                      Hi!



                      Steven Vetzal wrote on Jul 10, 2008 06:13:


                      I usually deploy the app exploded, and manage my time between server-side and client-side work. This allows me to prep some code, and then experiment with wiring it into the template and tweaking CSS, supporting graphics, etc.



                      Well, deploying the app exploded should be (is the?) work of the Eclipse Adapter (AFAIK it does it that way)



                      Oh, and I never bother bringing up JBoss from within the IDE. I find this a waste of time. They never handle hot-deploy right unless maybe it's a simple WAR project. And it slows it down.


                      Why? Why EAR projects are never handled in the right way? what is so wrong with JEE that makes EAR deployments so slow and problematic? again my put-everything-in-the-JSP friends have a turnaround time of 1 or 2 seconds and they can change everything they like.



                      Ignore the MacOS sucks flamebait. Use what platform you like - I've not found an uncorrupted install of any popular OS to be unstable for Java development, in my shop we use them all.


                      I agree, I think this is (as Java) a multiplatform project, JEE simply was not designed with development time deployment in mind... perhaps now that OSGi is moving in to the mainstream it will be possible to dynamically reload stuff and have turnaround times of, I don't know.. around 5 seconds? Are there any plans to add OSGi support for Seam (and specially for Hibernate entities?). Or I am wrong to suppose that OSGi support would dramatically improve turnaround time?


                      Regards,

                      • 8. Re: Long and Slow Turnaround: How fast is your development?
                        Francisco Jose Peredo Noguez Master

                        Hi!



                        Toomas Römer wrote on Jul 10, 2008 10:39:


                        Besides using JavaRebel the -client flag will increase the default startup speed. In development mode you won't need the -server JIT anyway IMHO. The run.sh of JBoss has -server by default.


                        Well, I use my own custom mixture of eclipse plugins (of course JBossTools is in the mix), but, for what I read here, it seems most people consider eclipse wtp a hindrance (instead of a tool to increase productivity).


                        I don't get that... why if eclipse sucks so much it seems to be the leading tool for Java development? (I Ant is the whay to go, why WTP is not using Ant internally for everything? (Yes I know it uses it for something, but, why in such a performance damaging way?)


                        Regards,

                        • 9. Re: Long and Slow Turnaround: How fast is your development?
                          Daniel Roth Apprentice

                          Ignore the MacOS sucks flamebait. Use what platform you like - I've not found an uncorrupted install of any popular OS to be unstable for Java development, in my shop we use them all.


                          Hey, don't get me wrong. It was no flaming, just my personal reflections after a year or so working with osx. There are no personal vendettas in what I wrote, just plain insights of what I have stumbled upon. Of course there are people developing on whatever OS with/without any problems. My problem is that our osx servers crash, with given trace, whereas our other servers don't. :)

                          • 10. Re: Long and Slow Turnaround: How fast is your development?
                            Francisco Jose Peredo Noguez Master

                            Hi!


                            For example, it would be great if, by getting OSGi support in Seam and Hibernate we could enable Faster testing cycles


                            I specially liked this part:




                            So if for example you are working in the web tier, continuously interacting with your web application and testing as you go, the web module will be refreshed on each change - and you won't need to wait for your persistence layer to be reinitialised each time. [...] This development experience is quite addictive: you have been warned!



                            I want that in Hibernate, I want that in Seam!


                            Regards,

                            • 11. Re: Long and Slow Turnaround: How fast is your development?
                              Pete Muir Master

                              I want that in Hibernate, I want that in Seam!

                              You have it in Seam (not through OSGi, but through our hot deploy). For hibernate, ask over there :p


                              I know that a target of JBoss AS 5.x is modularity and redeployment of individual units - so soon probably.