Announcement Announcement Module
Collapse
No announcement yet.
How to optimize loading of configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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">

    Comment

    Working...
    X