Recently in the GIX4 project has done some performance optimization, in order to facilitate with colleagues to share the experience, today is ready to put some of the relevant tips are written. These techniques are not difficult, not to say how well designed, but I think they are important. I remember when I was working on the last web system, I also supported OO's business-rich model, where I used linqtosql to achieve data access in most of the scenarios where performance was not required. In scenarios where performance requirements are high, manual SQL is used for data access. But in both ways, the same approach is used when optimizing data access. Today, the same method is used again in the GIX4.
As you can see, in applications that are programming for domain-oriented models, such optimization scenarios may be used frequently. The following two major programmes are to be written today:
1. SQL loads the aggregate object.
2. Pre-loading data.
Casually wrote the following outline in Notepad, about two times written, as follows:
Aggregate Model SQL
Why? Senarios.
Shortcoming of lazy load
SQL Design
How to integrate it into our system.
SQL Columns Generate
Load TableInfo
Static SQL format definition
Data Read Design
Algorithm
IGTable
Factory Method
naming convention
How to write codes in these methods
Develop progress
This design is used to refactor.
ForeAsyncLoader
Parallel Server for CSLA
ThreadSafe field
ThreadHelper.AsyncPrincipalWrapper()
Class design
Two ways for creating loading delegate for loader.(Data Load Region)
Summary
Questions remain
Paging?
Refactoring...