1 2 Previous Next 27 Replies Latest reply on Jun 25, 2010 11:46 AM by Victor Rubezhny

    xhtml code assist performance

    Vadim Berezniker Newbie

      Code assist takes about 3 seconds to come up every time I press Ctrl+Space or when it automatically comes up with all the possibilities.

       

      It's generally quick when showing a subset of the possibilities.

       

      Is there any logging I can enable or anything else I can do to see where the slow down comes from?

       

      I don't believe it's supposed to be this slow.

       

      Using JBoss Tools 3.1

        • 1. Re: xhtml code assist performance
          Alexey Kazakov Master

          There is an issue in JIRA https://jira.jboss.org/jira/browse/JBIDE-6039

          If you press Ctrl+Space first time for the file then it may take a few seconds to show EL proposals (agree that it's too much). But since you saw EL proposals first time it works much faster (at least for me).

          • 2. Re: xhtml code assist performance
            Vadim Berezniker Newbie

            It doesn't get any faster for me unfortunately.

             

            I'm not sure if this is the same issue as you linked. Is the issue describing the code assist that automatically pops up after you select an attribute or the code assist that lists the possible attributes of an element? The issue summary is not too clear. If it's attribute value then it sounds like the issue I'm having.

            • 3. Re: xhtml code assist performance
              Denis Golovin Master

              Vadim Berezniker wrote:

               

              Code assist takes about 3 seconds to come up every time I press Ctrl+Space or when it automatically comes up with all the possibilities.

              Vadim, could you give us a little more information about your case:

              1. What kind of project do you have

              2. Number of TLD's are included in project

              3. Is that delay happen for particular tag@attribute or it is happens all the time?

              4. What is(are) tag(s)@attribute that gives you 3 second delay?

              5. Anything you think could be useful to find and fix this particular issue.

              Thanks

              • 4. Re: xhtml code assist performance
                Vadim Berezniker Newbie

                Denis,

                 

                1. It's a seam-gen project with JSF nature added.

                2. I see 9 TLD files in 'Tag Libraries'

                3. The delay is when displaying all code assist possibilities. e.g. pressing Ctrl + Space without typing anything or the code assist that automatically comes up when you select an attribute. It works fine when I'm just accessing a property of a component or i type part of the tag/component name before opening code assist.

                4. --

                5. Is there any logging I can enable for JBoss Tools? For example to at least see which code assist provider is taking most of the time or to see any other kind of timing information? (I guess I could running Eclipse under a profiler but that seems overkill...)

                 

                EDIT: Never tried profiling Eclipse before, but here we go...

                 

                profile2.png

                • 5. Re: xhtml code assist performance
                  Denis Golovin Master

                  Vadim Berezniker wrote:

                  3. The delay is when displaying all code assist possibilities. e.g. pressing Ctrl + Space without typing anything or the code assist that automatically comes up when you select an attribute. It works fine when I'm just accessing a property of a component or i type part of the tag/component name before opening code assist.

                  How many namespaces has your page declared? Could you post them here?

                  Vadim Berezniker wrote:

                  ... the code assist that automatically comes up when you select an attribute ...

                  What kind of attribute do you select? Could you say exact taglib/tag/attribute?

                  I'm just trying to get all information to get this issue replicated.

                   

                  Vadim Berezniker wrote:

                  5. Is there any logging I can enable for JBoss Tools? For example to at least see which code assist provider is taking most of the time or to see any other kind of timing information? (I guess I could running Eclipse under a profiler but that seems overkill...)

                  That would be great if you can do something like this. I used http://www.khelekore.org/jmp today to get some performance statistic. It should be simple enough if you under linux. I haven't tried it on windows. Just add in eclipse.ini as a new line after -vmargs

                   

                  -Xjmp:nogui:noobjects:nomonitors:filter=recursive:org.jboss.tools:dumpdir=/path/to/existing/folder/for/report
                  

                   

                  It generates text file in  /path/to/existing/folder/for/report that can be loaded like CSV file to any spreadsheet (open office calc for example) and sorted to get most consumable methods. Be patient because it will slow eclipse down dramatically.

                  • 6. Re: xhtml code assist performance
                    Vadim Berezniker Newbie

                    There are probably a dozen namespaces on average. The page I've been testing on has 10.

                    I was using <rich:dataTable value="" /> but I don't believe the tag makes a difference.

                     

                    I think you missed the screenshot I edited in after I posted my reply.

                    It appears to be related to javadoc. I tried removing all of the attached javadocs from my project but it didn't make a difference in performance.

                    • 7. Re: xhtml code assist performance
                      Denis Golovin Master

                      Vadim Berezniker wrote:

                       

                      I think you missed the screenshot I edited in after I posted my reply.

                      What Java Pofiler are you using to get this screenshot? I'm curious because I couldn't find freea and good eonough

                      • 8. Re: xhtml code assist performance
                        Denis Golovin Master

                        It looks like Netbeans

                        • 9. Re: xhtml code assist performance
                          Victor Rubezhny Newbie

                          Hi, Vadim!

                           

                          It seems that your particular issue is not the one described in https://jira.jboss.org/jira/browse/JBIDE-6039. (But I suppose that JBIDE-6039 also plays significant role in your problem).

                           

                          The problem is that we calculate Javadoc info for each proposal using a long running JavadocContentAccess2 methods. But this is not a proper place for such calculations. This issue is subject to be fixed in JBossTools 3.1.1.

                           

                          It will be greate if you would verify this issue after fixing.

                           

                          I'll let you know in this thread.

                          • 10. Re: xhtml code assist performance
                            Vadim Berezniker Newbie

                            It's YourKit Java Profiler. It's not free though.

                            • 11. Re: xhtml code assist performance
                              Vadim Berezniker Newbie

                              Hi Victor,

                               

                              Thanks. I will try 3.1.1 when it's released.

                              • 12. Re: xhtml code assist performance
                                Max Rydahl Andersen Master

                                victor, which JBIDE issue is that ? please make sure its marked as blocker for 3.1.1 relase.

                                • 13. Re: xhtml code assist performance
                                  Victor Rubezhny Newbie

                                  https://jira.jboss.org/jira/browse/JBIDE-6039 and its sub-task (certainly related to this topic) https://jira.jboss.org/jira/browse/JBIDE-6167

                                   

                                  Currently I moved Proposal Context Information calculation out of proposals gathering cycle and this made significal improvement on CA appearance latency. This improvment related to Vadim's problem (JBIDE-6167).

                                  I'm marking JBIDE-6167 as blocker. But I'm almost ready to commit my changes or create a patch ('almost' - because some code clean-up is required).

                                   

                                  The second problem (I'm discovering under JBIDE-6039) is first-time values calculation by the models involved (JSF, Seam, CDI, Resource Bundles). And I currently have no Idea on how we can improve this.It's difficult to do something with it because the models are to be initialized and most of them are initialized at 'first access'. So, I'm not sure that we are able to achieve some significant improvements here. So, could we leave JBIDE-6039 as critical (but non-blocker) at least until we'll see effect of fixing JBIDE-6167?

                                  • 14. Re: xhtml code assist performance
                                    Victor Rubezhny Newbie

                                    Vadim,

                                     

                                    hope you're already using the JBoss Tools v.3.1.1.

                                     

                                    Also, I hope, we have improved the performance of CA.

                                     

                                     

                                    Sorry that I didn't informed you earlier,

                                    Victor Rubezhny

                                    1 2 Previous Next