function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
s s 56s s 56 

my vf page is very slow , what could be the reason, is it due to view state?

my vf page is very slow , what could be the reason, is it due to view state? , please suggest me 
thanks
ab
Bhaswanthnaga vivek vutukuriBhaswanthnaga vivek vutukuri

Yes, it might be due to view state, may I know what you are doing in the visualforce page.

If you displaying a list of records, apply pagination and display 10-20 records for every page not more than that.

Use transient variables where ever you can.

s s 56s s 56
hi Bhaswannag  thanks for your response i have 4 tabs and apex each tab for year like 2016,2017,2018,2019 and each tab has each vf page and separate apex class, unfortunately they have separate field for each year in account object , you are right they just display record based on search but evne no record also its taking time to load the page. instead of maintain single field and have a picklist value they had separate field for each year in account object, changing  into single field is not so easy and other than this any idea to increase the speed? please suggest . and also my instant has more than 600 object and apex reaches 93% of code . 
regards
ab
 
Bhaswanthnaga vivek vutukuriBhaswanthnaga vivek vutukuri

4 VF pages is not necessary and we can't say want we can optimize until we see code, use Javascript tabs instead of 4 different visualforce pages.

or use LDS tabs https://www.lightningdesignsystem.com/components/tabs/

s s 56s s 56
 this is already exising one and end users are familiar with the page look and feel and keeping single page is an excellent idea but BA dont want to change the look and feel, i will share the code could you please send me your mail id if you can. 
 
Bhaswanthnaga vivek vutukuriBhaswanthnaga vivek vutukuri
nagavivek222@gmail.com