Spring. Net Performance

Source: Internet
Author: User
Spring. NET performance is optimized in the following two aspects:

(1) spring. Net container initialization speed
You only need to add default-Lazy-init = "true" to the beans attribute in the spring beans management File (Note: default-Lazy-init = "false"), as shown in

<Beans default-Lazy-init = "true"> </beans>
 
In this way, the project startup speed can be greatly increased. It takes about 30 seconds to start each previous project, and generally takes 6 to 10 seconds after acceleration.

(2) nhib.pdf image loading speed
ReferenceArticle: Http://www.springframework.cn/blog? Post = 23
1. Use bidirectional one-to-Multiple Association instead of unidirectional one-to-Multiple Association
2. flexible use of one-way multi-to-one Association
3. Replace multiple-to-one instead of one-to-one
4. Configure the object cache without using the set slow storage
5. Use bag for one-to-multiple sets and set for multiple-to-multiple sets
6. Use explicit polymorphism for inheritance classes
7. The number of table fields should be small, and the table association should not be too large. The level-2 cache is supported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.