Issue Details (XML | Word | Printable)

Key: SHALE-301
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig McClanahan
Reporter: Mario Ivankovits
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

scan configures packages or jar files only

Created: 29/Sep/06 07:27 PM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: Tiger
Affects Version/s: None
Fix Version/s: 1.0.4

File Attachments:
  Size
File Licensed for inclusion in ASF works configurable_scan_packages.diff 2006-09-29 07:27 PM Mario Ivankovits 13 kB
File Licensed for inclusion in ASF works DumpScanPackages.diff 2006-10-01 08:40 AM Mario Ivankovits 13 kB
Java Source File Licensed for inclusion in ASF works DumpScanPackages.java 2006-10-01 08:41 AM Mario Ivankovits 5 kB

Flags: Patch


 Description  « Hide
Attached you will find a patch which allows to configure which packages or jar files shale-tiger should scan during startup.

The idea behind this patch is to improve the startup times of shale-tiger, though, this requires to have a good insight when used with 3rd party libraries. But the faster startup time one might get is especially during development worth it.

If the context configuration parameter is missing, the old scanning behaviour will be used.

A example for the configuration parameter:
        <context-param>
                <param-name>org.apache.shale.tiger.SCAN_PACKAGES</param-name>
                <param-value>com.ops.Contact.backings,com.ops.OPSJ.jsflib,shale-tiger-1.0.4-dev.jar</param-value>
        </context-param>

This example means:
* Scan all classes in "com.ops.Contact.backings" (and its children)
* Scan all classes in "com.ops.OPSJ.jsflib" (and its children)
* Scann all classes in "shale-tiger-1.0.4-dev.jar"

Using the above configuration speedup the startup from shale-tiger from 4.5 seconds to 0.5 seconds (for our application in development mode with 1461 classes in WEB-INF/classes and 91 dependencies in WEB-iNF/lib)

old behaviour:
2006-09-29 21:08:08,286 INFO [main] faces.LifecycleListener2 - Starting up Shale Tiger extensions
2006-09-29 21:08:12,847 INFO [main] faces.LifecycleListener2 - Startup of Shale Tiger extensions is complete

new behaviour:
2006-09-29 21:09:32,018 INFO [main] faces.LifecycleListener2 - Starting up Shale Tiger extensions
2006-09-29 21:09:32,506 INFO [main] faces.LifecycleListener2 - Startup of Shale Tiger extensions is complete


The patch is meant as a start for a discussion, once we found that this should go into the codebase I'll try to figure out how to create a test case and a better documentation for it.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #465957 Fri Oct 20 02:59:37 UTC 2006 craigmcc Add an optional optimization option for reducing startup time, by allowing
the developer to specify a set of Java packages and/or JAR files (in
WEB-INF/lib) that should be searched for Tiger annotations.

Thanks to Mario Ivankovits for the patch, which was applied with some
cosmetic changes.

SHALE-301
Files Changed
MODIFY /shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/LifecycleListener2.java
ADD /shale/framework/trunk/shale-tiger/src/main/java/org/apache/shale/tiger/view/faces/PackageInfo.java