You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Carlin Rogers (JIRA)" <ji...@apache.org> on 2007/02/09 18:41:05 UTC

[jira] Created: (BEEHIVE-1176) Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage()

Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage() 
-----------------------------------------------------------------------------------------

                 Key: BEEHIVE-1176
                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1176
             Project: Beehive
          Issue Type: Improvement
          Components: NetUI
    Affects Versions: 1.0.2, 1.0.1
            Reporter: Carlin Rogers
         Assigned To: Carlin Rogers
             Fix For: V.Next


The NetUI annotation processors make calls to TypeDeclaration.getPackage() in various places.  This is not always a simple and fast call, In some APT cases, to create a PackageDeclaration involves bringing the entire 
package into memory, which involves reading jar files. With some first passes of profiling I noticed we were spending lots of time in calls to org.apache.beehive.netui.compiler.typesystem.impl.declaration.TypeDeclarationImpl.getPackage(). In most cases we just use the PackageDeclaration to get the package name. This could be avoided by just getting the fully qualified name of the TypeDeclaration and stripping off the class name portion to get the package name.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEEHIVE-1176) Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage()

Posted by "Carlin Rogers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEEHIVE-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483645 ] 

Carlin Rogers commented on BEEHIVE-1176:
----------------------------------------

To avoid a perf hit from the call to the PackageDeclaration getClasses() method in the NetUI AP check routine, checkForOverlappingClasses(), I modified it so that it checks for the current processing phase (option when running in an IDE). If it is the reconcile phase, then the routine will not run. Otherwise, during the build routine, it will run, calling the PackageDeclaration getClasses() method and checking for more than one Controller class within the package.

> Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage() 
> -----------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1176
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1176
>             Project: Beehive
>          Issue Type: Improvement
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2
>            Reporter: Carlin Rogers
>         Assigned To: Carlin Rogers
>             Fix For: V.Next
>
>
> The NetUI annotation processors make calls to TypeDeclaration.getPackage() in various places.  This is not always a simple and fast call, In some APT cases, to create a PackageDeclaration involves bringing the entire 
> package into memory, which involves reading jar files. With some first passes of profiling I noticed we were spending lots of time in calls to org.apache.beehive.netui.compiler.typesystem.impl.declaration.TypeDeclarationImpl.getPackage(). In most cases we just use the PackageDeclaration to get the package name. This could be avoided by just getting the fully qualified name of the TypeDeclaration and stripping off the class name portion to get the package name.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEEHIVE-1176) Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage()

Posted by "Carlin Rogers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEEHIVE-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483687 ] 

Carlin Rogers commented on BEEHIVE-1176:
----------------------------------------

The code change for the previous comment is in svn revision 521762.

I also added a new compiler test to exercise the checkForOverlappingClasses() method and check for more than one Controller in a package. The test was committed in svn revision 521822.

> Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage() 
> -----------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1176
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1176
>             Project: Beehive
>          Issue Type: Improvement
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2
>            Reporter: Carlin Rogers
>         Assigned To: Carlin Rogers
>             Fix For: V.Next
>
>
> The NetUI annotation processors make calls to TypeDeclaration.getPackage() in various places.  This is not always a simple and fast call, In some APT cases, to create a PackageDeclaration involves bringing the entire 
> package into memory, which involves reading jar files. With some first passes of profiling I noticed we were spending lots of time in calls to org.apache.beehive.netui.compiler.typesystem.impl.declaration.TypeDeclarationImpl.getPackage(). In most cases we just use the PackageDeclaration to get the package name. This could be avoided by just getting the fully qualified name of the TypeDeclaration and stripping off the class name portion to get the package name.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BEEHIVE-1176) Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage()

Posted by "Carlin Rogers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEEHIVE-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlin Rogers resolved BEEHIVE-1176.
------------------------------------

    Resolution: Fixed

I've gone through both the NetUI and Controls code to replace code that called TypeDeclaration.getPackage() with a call to a utility routine that gets the fully qualified name of the TypeDeclaration, then strips off the class name portion to return the package name. This is resolved with svn revision 505517.

> Improve NetUI AP perf by reducing the number of calls to PackageDeclaration.getPackage() 
> -----------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1176
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1176
>             Project: Beehive
>          Issue Type: Improvement
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2
>            Reporter: Carlin Rogers
>         Assigned To: Carlin Rogers
>             Fix For: V.Next
>
>
> The NetUI annotation processors make calls to TypeDeclaration.getPackage() in various places.  This is not always a simple and fast call, In some APT cases, to create a PackageDeclaration involves bringing the entire 
> package into memory, which involves reading jar files. With some first passes of profiling I noticed we were spending lots of time in calls to org.apache.beehive.netui.compiler.typesystem.impl.declaration.TypeDeclarationImpl.getPackage(). In most cases we just use the PackageDeclaration to get the package name. This could be avoided by just getting the fully qualified name of the TypeDeclaration and stripping off the class name portion to get the package name.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.