Tom Mueller created FELIX-4042:
----------------------------------

             Summary: improve Felix.init time by modifying the way the cache is 
loaded
                 Key: FELIX-4042
                 URL: https://issues.apache.org/jira/browse/FELIX-4042
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: framework-4.2.1
            Reporter: Tom Mueller


The GlassFish server has 292 bundles and this number continues to increase. 
When starting the server, the entire bundle cache is read in by Felix in the 
Felix.init method by calling Felix.reloadBundle in a simple for loop. 
Currently, in GlassFish this takes 440 ms on a MBP which is about 10% of the 
entire server startup time. 

With the availability of multi-threaded CPUs and memory-cached disk I/O, it 
might be possible to improve Felix framework initialization time by making this 
process multi-threaded. Unfortunately, the reloadBundle method locks the global 
lock for almost its entire execution, so simply multi-threading the loop will 
not help.  The reloadBundle logic will need to be refactored to make 
multi-threading effective in improving performance. 

Another idea is to somehow flag certain bundles for reloading before other 
bundles and then allow "lazy" loading of this cache. When GlassFish starts, 
there are some bundles that are needed immediately while others are not 
accessed until later. 

The goal for this improvement request is to have a constant initialization time 
for Felix that is independent of the number of bundles that are in the cache. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to