You need to sign in to do that
Don't have an account?
Huge Custom sForce Control - Load Time Problems
We decided to build a highly customized AJAX front-end to our Leads data, which we renamed to Inquiries. The reason was that we have about 180 custom fields and the built-in UI would have been a pain to work with and train my users on. Coming from a custom development background, I really had a very specific UI in mind and wanted certain fields to always be present on the screen rather than scrolling away.
We opted for an AJAX methodology so that we could eliminate the need for a submit button, create some auto-save and onunload() save functionality, and update certain fields based upon other field selections. Dependent picklists would not have given us enough flexibility.
So we rolled out this massive sforce control last week and the biggest problem we are having is load time. It takes a few seconds for Salesforce to load the control and display it to the browser (we have optimized for Firefox) and then it can take anywhere between 4 and 10 seconds to load all the necessary data. When this is done on a typical user's computer, it can take 15 seconds or more before they can begin interacting with the data.
Here is a link to the code. If you have any suggestions of ways to speed it up, please let me know or post it here. I appreciate any insight that any of you could give. My user's are pulling their hair out waiting to edit a "Lead" or create a new one. It is a call center for drug and alcohol treatment and we handle tons of calls per day.
http://marketingcrc.com/salesforce/ajax_060109.txt
AJAX Toolkit Beta 2
I just took a quick look, but one question leaped to mind.
Why are you making all these multiple calls to sforceClient.init()? I make one call followed by a Login() (so I can develop externally) as one of the first things in my execution and just use that sforceClient handle for the rest of the call. You're calling init() many times for data loading. I wonder if that's impacting your startup times.
My load times are faster, but then again I'm not loading as much data at startup time as you are, I only have a few queries and picklists to initialize. Still, you might try removing all the init() calls but one and see what happens? Or perhaps I'm missing something... :-)
Best, Steve.
also, ( without looking at the code) i can suggest fetching some of the data first, drawing it, then setting a timeout.
the timeout allows the browser to draw the data, could be the top of the page and then when the timer fires, you fetch the rest of the data, perhaps on a scroll down.
it's not faster, just feels like it and the user can begin to read / interact the first data that appears.
It seems to still take 4 or 5 seconds before the sforce control is loaded into the browser. Is this an overall Sforce or API problem? I guess we will need to look into Ron's suggestion of breaking the load into multiple steps so the user can begin working while other data loads in the background. I am still running 10 to 20 seconds, with the average being 17 seconds before the page is usable. Some users have seen 50, 60 and even hundreds of seconds. What could cause these types of extreme delays?
Our last resort is building a separate VB application or externally hosted AJAX form which will speak to the API. Would this buy us anything?
-Jim
also the AJAX toolkit has a set of timing / profiling calls, you could probably instrument the startup times.
i havent used those functions, yet.
As another test, we commented out most of our var assignment and loadLead() functions so that we only process the fields shown on the first page of our form (we have 6 or 7 separate divs that load dynamically from links). This also made no difference in load time!
So I keep coming back to the API. I am working with SF support to evaluate the load time and see if there are any backend improvements we can make. Ultimately we might need to create our own streamlined AJAX toolkit.