[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user asfgit closed the pull request at: https://github.com/apache/syncope/pull/36 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77492458 --- Diff: client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java --- @@ -51,6 +53,8 @@ private ListextPages; private List extWidgets; + +private List basePackages = Arrays.asList("org.apache.syncope.client.console"); --- End diff -- A simple `String` field should do the job. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491727 --- Diff: core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java --- @@ -74,6 +75,8 @@ private MapaccountRuleClasses; private Map passwordRuleClasses; + +private List basePackages = Arrays.asList("org.apache.syncope.fit.core", "org.apache.syncope.core"); --- End diff -- Prior to this change, one could create classes, in its own Maven-based Syncope project, under any package, now it is forced to do it under `org.apache.syncope.client.console` but we got more startup speed. I guess it is an acceptable trade-off. LGTM. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77492468 --- Diff: core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java --- @@ -74,6 +75,8 @@ private MapaccountRuleClasses; private Map passwordRuleClasses; + +private List basePackages = Arrays.asList("org.apache.syncope.fit.core", "org.apache.syncope.core"); --- End diff -- A simple `String` field should do the job. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491706 --- Diff: client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java --- @@ -51,6 +53,8 @@ private ListextPages; private List extWidgets; + +private List basePackages = Arrays.asList("org.apache.syncope.client.console"); --- End diff -- Prior to this change, one could create classes, in its own Maven-based Syncope project, under any package, now it is forced to do it under `org.apache.syncope.client.console` but we got more startup speed. I guess it is an acceptable trade-off. LGTM. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491786 --- Diff: core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java --- @@ -226,5 +233,15 @@ public void load() { return passwordRuleClasses.get(passwordRuleConfClass); } + +/** + * @return basePackages for syncope class classpath scanning + */ +protected List getBasePackages() { +return basePackages; +} +public void setBasePackages(final List basePackages) { --- End diff -- Who is supposed to invoke this method? I would remove it. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491754 --- Diff: core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java --- @@ -226,5 +233,15 @@ public void load() { return passwordRuleClasses.get(passwordRuleConfClass); } + +/** + * @return basePackages for syncope class classpath scanning + */ +protected List getBasePackages() { --- End diff -- Did not get what this method was for, at a first glance, then I've realized it might be used for subclasses: please mention this in the javadoc. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491468 --- Diff: client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java --- @@ -161,5 +169,15 @@ public int compare( public ListgetExtWidgetClasses() { return extWidgets; } + +/** + * @return basePackages for syncope class classpath scanning + */ +protected List getBasePackages() { --- End diff -- Did not get what this method was for, at a first glance, then I've realized it might be used for subclasses: please mention this in the javadoc. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/36#discussion_r77491348 --- Diff: client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java --- @@ -161,5 +169,15 @@ public int compare( public ListgetExtWidgetClasses() { return extWidgets; } + +/** + * @return basePackages for syncope class classpath scanning + */ +protected List getBasePackages() { +return basePackages; +} +public void setBasePackages(final List basePackages) { --- End diff -- Who is supposed to invoke this method? I would remove it. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] syncope pull request #36: Startup performance tweaks : restrict startup scan...
GitHub user gonzalad opened a pull request: https://github.com/apache/syncope/pull/36 Startup performance tweaks : restrict startup scanning to syncope packages Without this PR, standalone tomcat startup takes 135s (by default, syncope scans all packages). With this PR, it takes 32s. Startup scanning is restricted to packages : * org.apache.syncope.client.console * org.apache.syncope.fit.core * org.apache.syncope.core You can merge this pull request into a Git repository by running: $ git pull https://github.com/gonzalad/syncope 2.0.0-M2-startup-perf1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/syncope/pull/36.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #36 commit 9d756e830db78c2c754adbc8010d4c3079e3ddc7 Author: Adrian GonzalezDate: 2016-08-29T09:36:44Z Startup performance tweaks Restrict startup scanning to syncope packages. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---