Four years of Java Coder Experience streamlined optimization summary, details can be with the micro-blog @ Light Workshop

Source: Internet
Author: User
A front-end
IMG image Specifies the long width, compress the img picture, the whole page merges the picture as far as possible, similar Taobao drop practice
CSS Code tuning
CSS loading file order, CSS file compression
JS load files rely on optimization (can rely on Yahoo Drop front-end framework, you can write their own JS code, the principle is reasonable use of JS drop document.write.), JS file compression
JSP file compression (including JSP file drop code compression and server middleware drop set JSP format compression)
JS Framework optimization (such as a reasonable reduction of the jquery related drop-ins related droplet function, etc.)
JS Code Calligraphy Optimization (understand the internal scope of JS chain drop principle for code optimization, optimize JS drop for loop, etc.)


Two Middle End
JSP code optimization (for example, although less use session, reasonable use of dynamic static include ...)
SSH Framework combination optimization (project late configuration files are more optimized)
Framework service Layer DAO layer Business logic Drop code optimization, involving congestion model, poor preparation model drop understanding
Transaction management Drop Optimization in the framework (focus on spring or your own transaction framework drip optimization)
Writing optimization for Java code in a framework (e.g. NULL plus protection, for loops beware of new objects, large objects point to null manually)
If there are ORM drops, ORM optimization (such as Hibernate drop primary key configuration drop optimization, one-to-many multiple to one Configuration mapping drop optimization, delay load drop optimization, two-level cache optimization, no beyond the requirements, try to avoid three-level cache)
Middleware Drop JVM recovery algorithm, such as configuration optimization (such as the heap of the new generation of new generations of memory allocation, which type of project to take the type of recovery algorithm, single-threaded multithreading, of course, these also have to take into account the JVM version of the problem, is hotspot


Not jrocky wait, is 1.5 1.6 or 1.7, 1.7 of G1 already done good enough drops
If you use a Web server, such as Apache, you need to make a small optimization of the maximum number of connections to the HTTP connection pool.


Three back end
Mysql
The production environment will involve MySQL configuration parameter drop optimization, such as key cache, cache pool drop memory allocation and other optimization, developer not required
database table structure optimization (such as multiple use not null,datatime to Timestamp,varchar limit characters, reasonable use of char,tinyint, large data table and small data table separate, TUI direct separation, horizontal separation-table partitioning, char field


Without indexing, InnoDB must build primary key, table association optimization, etc. ...)
SQL optimization and index optimization (reasonable analysis of execution plan reasonable forecast analysis of production environment data indexing, such as try not to build on Char Index, DATATIME Index to timestamp index, SQL reasonable use of overlay index, such as paging SQL to benefit


With the overlay index to delay loading, InnoDB without count (*), GROUP by plus ORDER by NULL, reasonable use and close the Sql_query_nocache query cache, SQL statements as far as possible do not use similar current_date this Han number,


The query cache does not work, and so on and so on ...
If the business needs to open MySQL cluster (shared drop data, table engine needs to be changed to DBD), MySQL read and write separation, master to slave or master to master as the case may be, if the cattle can also master to master Master to master .....



If the migration effort of the Oracle migration to the MYSQL,DB structure is not significant (the difficulty is that MySQL is slightly different from the Oracle drip, there is no oralce so powerful and needs to compromise), the main workload is that the SQL code needs to be optimized and stored procedures need


To rewrite (as far as I know the Oracle drop stored procedure uses a large array of drops, and the MySQL drop stored procedure does not have the concept of an array, instead of a temporary table, etc.)







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.