1 2 Previous Next 15 Replies Latest reply on Mar 13, 2014 1:21 PM by Richard Yang

    Problems removing CDI support from project

    hd0815 Newbie

      Hi,

       

      I'm facing the following problem with JBoss Tools 3.3 and Eclipse Juno.

      I have a project which needed CDI support from JBoss Tools prior but all CDI content went into a seperate project now. Because the project contains a lot of java classes and the invokation of the CDI builder eats up a lot of time (> 10 minutes) I tried to remove the CDI support from this project. It isn't needed anymore.

      I tried doing this via right click on project --> Configure --> Remove CDI support. This doesn't seem to work.

      I also tried this via right click on project --> Properties --> CDI Settings --> uncheck the checkbox for CDI support --> Apply --> OK. This doesn't seem to work neither, because the checkbox is checked again, when I look into the project properties again.

      I also removed the CDI Builder from the builders for this project via right click on project --> Properties --> Builders --> uncheck the checkbox for CDI Builder --> OK, but a new builder for CDI was added afterwards.

       

      Now I don't know what to do next. All I want to do is remove the support for CDI.

       

      Note: It didn't work with Eclipse Helios for and JBoss Tools 3.3 my colleague neither.

       

       

      Thanks in advance

        • 1. Re: Problems removing CDI support from project
          Max Rydahl Andersen Master

          are your projects Maven projects ? if yes, make sure you disable the automatic CDI detection under JBoss Tools Maven settings.

           

          That said, I'm really curious to find out why you are having slow experience.

           

          Does the CDI builder block you from working ?

           

          i.e. are you waiting for the CDI builder to finish because the progress bar is running and the job is done in the background or is really blocked ?

          • 2. Re: Problems removing CDI support from project
            hd0815 Newbie

            Yes, these project are Maven projects.

             

            I disabled the automatic CDI detection as mentioned and now CDI support stays unchecked. Thanks for your help.

             

            The CDI builder blocks me from working sometimes. I'm not quite sure what happens there, but pressing the cancel button doesn't seem to stop the process sometimes (not always) and when I don't press it I'm facing big problems because my RAM (respectivly Xmx parameter from JVM) is flooded while CDI builder comes up.

            This means the process is working in background but because of that RAM flooding thing I'm really not able to work with eclipse during that time. I set the Xmx parameter to 2048M using eclipse and java 64-bit and it keeps killing my RAM cnstantly day after day. :-)

            • 3. Re: Problems removing CDI support from project
              Alexey Kazakov Master

              How many Java classes do you have in your project?

              Do you see anything in Eclipse log?

               

              We fixed some important bugs in CDI Tools 4.0.0.Alpha2 which cause a significant increase in memory usage in JBoss Tools 3.3

              If you have a chance to install JBoss Tools 4 then please let us know if you still have this performance issue with CDI builder.

              • 4. Re: Problems removing CDI support from project
                hd0815 Newbie

                The mentioned project itself has about 3,5k class-Files with a total size of about 25MB. If this is relevant, it has a lot of dependencies.

                 

                I looked through the logs of eclipse from the past ten days and didn't find anything what could cause this. But I'm pretty sure I had problems with this in the past ten days.

                 

                Because the CDI Tools 4 are at Alpha state and we need those tools in a different project I'm not convinced to switch versions. I deactivated CDI tools for this project. I will keep an eye on the progress bar to find out if eclipse invokes the builder for this project again.

                • 5. Re: Problems removing CDI support from project
                  Max Rydahl Andersen Master

                  hd0815 - don't let the "alpha" state scare you it would be of tremendeous help to us if we could get a basic verification from you if your big project loads/runs faster on the Alpha2 version - if you first do it when the tools are GA it becomes much harder for us to adjust it.

                   

                  To make things simple you could go get JBDS 6 Alpha 2 from http://devstudio.jboss.com/earlyaccess - that will install a separate eclipse and you can import the project in there with no risk of affecting your current setup.

                   

                  p.s. you can also try to use the exact same workspace to avoid having to import, but if you do just take a backup of the workspace before you do - it should not break anything but I don't want you to accidentally bump into some bug with respect to workspace preferences

                  • 6. Re: Problems removing CDI support from project
                    hd0815 Newbie

                    Hi,

                     

                    I downloaded the devstudio and tested the performance of the CDI Builder at the project. I'm not absolutly sure about the exact duration but it lasts at least five minutes for me to let the builder come to an end. I recognized that the garbage collector is working a lot better in this version because I didn't get my heap filled. I could work while the new version of the builder does his part. So there is a noticable improvement of the performance.

                    • 7. Re: Problems removing CDI support from project
                      Viacheslav Kabanovich Newbie

                      Hi,

                       

                      Thank you for your feedback, we appreciate it very much. It is true that performance of JBoss CDI tool on large projects is a critical factor. For now, we randomly generate large projects and look for narrow places (slow code, memory leaks) to improve. But performance on a random project and a real project may differ a lot. So, could you please provide us with a bit more performance figures for the latest devstudio.

                       

                      1) Clean/build the project. Please watch the progress view as it displays task names (a) Compiling, (b) CDI Builder, (c) CDI Validator, (d) EL Validator and approximately mesure time spent on each.

                      For a random project with 3000 source files and 15M of code it takes on my computer:

                      (a) Compiling - 5 sec

                      (b) CDI Builder - 5 sec

                      (c) CDI Validator - 1 min

                      (d) EL Validator - 1 min

                       

                      2) Incremental build -  modify and save a source file. Again, please watch the progress view.

                      For the mentioned random project:

                      (a) Compiling - 0 sec

                      (b) CDI Builder - 0 sec

                      (c) CDI Validator - 20 sec (generated injections and class hierarchy make almost any two classes dependent on each other, and change in one requires to revalidate all others)

                      (d) EL Validator - 3 sec

                       

                      3) Restart Eclipse, open a source with an injection point, and invoke open-ons with Ctrl+mouse left button at @Inject. At the first time, progress information window appears "Build CDI Model" - for 5 sec for the mentioned random project.

                       

                      Also, could you please estimate how many injection points and producers are in your project.

                      Has your project got many page files with EL?

                       

                      Thank you.

                      • 8. Re: Problems removing CDI support from project
                        hd0815 Newbie

                        Hi,

                         

                        I did the following tests:

                         

                        perform a clean via Project --> Clean.

                         

                        Under Eclipse Juno with latest updates and the latest development release of JBoss Tool for Juno:

                        (a) clean: 5 sec

                        (b) CDI Builder: 55 sec

                        (c) compile: 1 min 5 sec

                        (d) JBoss KnowledgeBaseBuilder: 1 min 20 sec

                        (e) CDI Builder (again): 16 min 30 sec

                        (f) compile (again): 20 sec

                         

                        total time: 20 min 15 sec

                         

                        Under latest JBoss DevStudio 6.0.0 Alpha 2

                        (a) clean: 15 sec

                        (b) copy resources: 1 min 35 sec

                        (c) compile: 45 sec

                        (d) CDI Builder: 10 sec

                         

                        total time: 2 min 45 sec

                         

                        The validators are not relevant for this project because the project doesn't use CDI nor EL as I already mentioned.

                         

                        I realized that the eclipse version of JBoss Tools is using a lot more RAM or at least releases the RAM not so frequently.

                         

                        HTH

                        • 9. Re: Problems removing CDI support from project
                          Max Rydahl Andersen Master

                          hd0815 again thanks for helping test it and i'm happy to see that the improvements we made also help on your project.

                           

                          It still has issues though it seems in JBT - and this might be caused by different memory settings. Could you check what is in your eclipse.ini you are running JBT with ?

                           

                          And finally, you say you are not using CDI nor EL in this project - that's interesting since then i'm curious if our CDI detector is "too aggressive" or its just because you include the CDI dependencies but don't use them ?

                          • 10. Re: Problems removing CDI support from project
                            hd0815 Newbie

                            In the Eclipse Juno configuration I only changed some vm parameters like xms and xmx. Here is the part that is relevant:

                            --launcher.XXMaxPermSize

                            256m

                            -vmargs

                            -Xms128m

                            -Xmx2048m

                             

                            In JBoss DevStudio I didn't change anything as I didn't find an eclipse.ini file and didn't want to mess around with other files.

                             

                            In our projects we have the following structure:

                             

                            ProjectA (the porject I made the performance tests on) --> depends on Project B

                            Project C (which uses CDI) --> depends on Project B

                            Project D (which uses CDI and EL) --> depends Project C

                             

                            We had CDI usage in Project B but completly moved it to Project C. Maybe the CDI support for Project B stayed and this is why Project A also had it. I removed CDI support for the projects A and B (after this test) manually.

                            • 11. Re: Problems removing CDI support from project
                              Max Rydahl Andersen Master

                              thanks hd0815 - the devstudio the ini file is jbdevstudio.ini:

                               

                              --launcher.XXMaxPermSize

                              256m

                              --launcher.defaultAction

                              openFile

                              -vmargs

                              -Xms512m

                              -Xmx1024m

                               

                              so it might be that the lower initial memory setting you are running with is giving you a performance hit, but I wouldn't expect it to have *that* big impact.

                               

                              thanks for the info.

                              • 12. Re: Problems removing CDI support from project
                                hd0815 Newbie

                                I had the same problem with -Xms configured at 2048m also. I tried a lot of configurations in my eclipse.ini but nothing really changed something. I tried the experimental GC from JDK 1.6. I tried setting MaxPermGenSize to 512m and so on.

                                 

                                Therefore I don't think that this is the problem.

                                • 13. Re: Problems removing CDI support from project
                                  Richard Yang Apprentice

                                  Is there anyway to turn off the CDI support in jboss tools?

                                  I am using eclipse 4.3.2 and building workspace takes forever. It is stuck on Invoking CDI builder for over an hour (we have more than 10 modules). Everytime I changed something, the CDI builder kicks in and take a long time to run.

                                  I really hate the CDI builder. It wastes our valueable development time. I turned it off on each project (the cdi support) and after a whilie it comes back. It is likes a virus!

                                  • 14. Re: Problems removing CDI support from project
                                    Max Rydahl Andersen Master

                                    a) please open a jira on performance issues so we can investigate those

                                     

                                    b) if you have maven projects remember to also uncheck "CDI" under JBoss Maven Tools in preferences - otherwise it will activate when it sees you are using CDI.

                                     

                                    But please - open jira with some info so we can investigate.

                                    1 2 Previous Next