Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    performance problem with Canvas.getChildren()

    Using SmartGWT-4.0 (released Jul 05, 2013), browser is Chrome v. 31.

    While tracking down performance problems within a rather complex SmartGWT application, I noticed that a significant amount of time is spent somewhere inside the Canvas.getChildren() method call. I looked at the source code for that method, and this is using ConvertTo.arrayOfCanvas().

    Most of the time is spend doing a call to obj.getAttribute("__ref"), which apparently creates a string representation of something, and compares that with null. It seems to me there might be more optimal ways of doing this check.

    #2
    See the FAQ about why not to use Chrome in Development Mode.

    This method has no performance consequences in compiled mode.

    Comment


      #3
      I know that development mode is unusable with Chrome, and I was using compiled mode.

      Comment


        #4
        We don't see a performance issue with that code. You might need to upgrade core GWT, or perhaps you have some other development tools interfering. Let us know if you can produce a minimal test case suggesting any kind of framework performance issue.

        Comment


          #5
          I have a screenshot of the profiling of the arrayOfCanvas implementation. You can see that a significant amount of time is spent in a getAttributeAsString call, and according to the implementation of arrayOfCanvas, the result is only used to compare with null.
          Attached Files

          Comment


            #6
            We were able to find calls to getAttributeAsString on form items but it only applies to FormItem children. The image you included only shows a small trail of execution, and you neglected to provide a small test case, so we can only guess that this might possibly be what you are executing. Please verify with tonight's nightly build and let us know if it resolves your issue. If it does not, please include a test case, as we previously requested.

            Thanks.

            Isomorphic

            Comment

            Working...
            X