Results 1 to 2 of 2

Thread: How to optimize loading of configuration

  1. #1
    Join Date
    Oct 2004
    Location
    Moscow
    Posts
    32

    Default How to optimize loading of configuration

    I have Swing application with 10 - 20 beans in application*.xml. This configuration is loaded 2.5 sec by FileSystemXmlApplicationContext. In future amount of beans will be increased.

    I have strict requirements for loading time of application and I want to solve problem before I will have problem on production.

    Is there a simple way to reduce parsing time? Is there a way to define something like this: <import resource="application-business.xml" lazy-init="true"/> or using fastest version of ApplicationContext ?

    I know I can load only ui application xml first and business xml late. But this will be an impact on my design and it is not appropriate solution.

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Configuration parsing and processing is normally very fast. The time taken is basically that of the instantiation time of the beans created, rather than XML etc. Have you looked at where the time is going? I doubt it's XML parsing.

    In answer to your question, you could set default-lazy-init to true in files you import.

    Code:
    <beans default-lazy-init="true">
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •