9 Replies Latest reply on Jul 22, 2008 7:58 AM by maxandersen

    High CPU Usage

    mindgame

      Hello,

      I have a fresh installation of Eclipse Europa (Winter) and JBT 2.1.1.GA with the JBoss WTP patch.

      When I type codes in the editor, each time a character is typed, significant CPU usage is detected. I suspect this is related to the real-time code assist but I failed to isolate the root cause of the problem.

      Can someone share their eclipse preferences or some insight in this problem? Thanks.

        • 1. Re: High CPU Usage
          maxandersen

          I haven't heard about such reports since the initial betas of 2.0.0.GA so if you could please help with some more details - e.g. project type, file size and content?

          • 2. Re: High CPU Usage
            mindgame

            Max,

            The project was created by JBoss Tools 2.0 (beta) using the Seam project template and was working fine with 2.0.GA. Last week we upgraded to JBoss Tools 2.1.1.GA and start working with the project and noted the problem as mention in my original post.

            Files' size are small, in most cases, less than 100 KB. The problem occurs when editing .java and .xhtml files. Even when we type "space", Eclipse CPU usage spike and this make the editor less responsive.

            Do we have to re-create the workspace and all its associated projects when migrating from JBT 2.0 to JBT 2.1.1.GA?

            We will continue to systematically play around with Eclipse preferences to try to isolate the problem.

            Thanks.

            • 3. Re: High CPU Usage
              maxandersen

              no, previous workspace should not affect performance this way.

              It would be *great* if you isolate the problem and let us know - is there anything showing up in the Error Log ?

              Since it both happens .java and .xhtml files maybe you are hitting some issue with the Seam EL completion we haven't seen yet. You can disable the Seam EL completion for the .java files by going to preferences type in "completion" and there should be a preference page that lists which code completions the java editor will do first (and which it will do on a second press on code completion)

              If the speed goes up when you disable the Seam EL code completion then we know something is fishy.


              • 4. Re: High CPU Usage
                mindgame

                Max,

                we think we have resolved the problem by re-installing. The only difference this time is we skipped the upgrade of WTP via the Eclipse and just uses the patch provided by JBoss for WTP 2.0.2.

                The CPU spike observed when using the text editor is no longer an issue.

                Thank you for your time.

                • 5. Re: High CPU Usage
                  maxandersen

                  interesting...have you tried redoing it and see if you could reproduce it ?

                  If yes, we should get the issue reported against bugs.eclipse.org

                  • 6. Re: High CPU Usage
                    mindgame

                    Max,

                    yes, we observed problem when deploying EAR to Jboss via Jboss Tools with only Eclipse WTP patch applied. One of the problem was jboss-seam.jar was not included in the EAR package.

                    Of course, the problem is solved when using the JBoss 'home-brew' patch.

                    • 7. Re: High CPU Usage
                      maxandersen

                      ok, so that "cpu spike" is Eclipse WTP starting to throw exceptions all over the place - our patch avoids this.

                      • 8. Re: High CPU Usage
                        mindgame

                        We did not check the Eclipse log file for exceptions and there were no error dialog related to instances of CPU spike. CPU spike was observed when using code assist editing JSF and Java files.

                        Everything is fine when the JBoss WTP patch is applied on a fresh Eclipse installation.

                        We are currently, using JBT 2.1.2 with JBoss patch and no problem have been observed so far.

                        • 9. Re: High CPU Usage
                          maxandersen

                          when editing files you are triggering the publishing of ejb3 jars which in WTP 2.0.2 causes all kind of exceptions resulting in cpu usage.

                          WTP just came out with WTP 2.0.3 which incorporates our patches according to their release notes but I haven't had time to test it; let me know if you try it.