Try to avoid extra variables in <apex:form>. Use transient as much as possible. Do not query extra fields in SOQL or SOSL. Keep optimezed you code and make it do what is expected only with scalability.
1. Use Transient keyword for variables which are storing temporary values. 2. Declare variables as Static wherever possible as they are not included in view state. 3. Refine Your SOQL to Retrieve Only the Data Needed by the Page. 4. Use Custom Objects or Custom Settings to Store Large Quantities of Read-Only Data. 5.Use HTML forms instead <apex:form>. 6.Use HTML components instead of <apex:commandbutton>,<apex:commandlink> ,etc to make your page stateless which saves hitting view state limits.
Consider studying below link article.It is the best. https://developer.salesforce.com/page/An_Introduction_to_Visualforce_View_State
1. Use Transient keyword for variables which are storing temporary values.
2. Declare variables as Static wherever possible as they are not included in view state.
3. Refine Your SOQL to Retrieve Only the Data Needed by the Page.
4. Use Custom Objects or Custom Settings to Store Large Quantities of Read-Only Data.
5.Use HTML forms instead <apex:form>.
6.Use HTML components instead of <apex:commandbutton>,<apex:commandlink> ,etc to make your page stateless which saves hitting view state limits.
Consider studying below link article.It is the best.
https://developer.salesforce.com/page/An_Introduction_to_Visualforce_View_State