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
TJGAGTJGAG 

DescribeLayout performance

Hi all,
 
I'm using beta3.3 to perform a DescribeLayout on the Account object.  It takes at least 90 seconds for a the function to complete.
 
Is this a common experience? 
 
I'm only in a test environment at the moment but if this is the sort of response I can expect it won't be a viable option.
 
Is there anything I could do to speed it up?
 
Thanks,
 
Andrew
DevAngelDevAngel
Describe layout is the heavyest of all the api calls.  The current version of describelayout has no concept of granularity.  The results contain the layouts for every record type for the object that you have requested the layout for.  In addition, it contains the edit layout as well as the detail layout for each record type.
 
There is really not much that can be done to prevent a long load time for this call.  I believe we are addressing the issue in upcoming releases to allow at a minimum, the specification of the record type and object type for the describe layout call, but may be going even further.
 
If you have a fairly static use of the describe layout (probably not likely), you could include those definitions in a js file to include.  Another option would be to investigate a persistent cache technique called AMASS http://codinginparadise.org/projects/storage/README.html.
 
Cheers
The_FoxThe_Fox
Hi,
 
In my IHMO relying on Flash is bad:smileymad:

Just my two cents
DevAngelDevAngel

Yup.  But....

You have to consider the alternative.  Have you seen the browser penetration statistics with regards to flash?

Macromedia Flash Player Version Penetration and Flash Player Penetration Survey (97.3% on internet-connected PCs)

So, odds are the technology is there.  If you have to wait for 90 seconds everytime any page loaded you would not use the page.

TJGAGTJGAG

Thanks for the info.

I'm going down a simpler route.  The requirement is to make sure required fields have been completed for the account.  The problem is that if a lead os converted to an opportunity, an account can be created without many of the required fields being completed.

For now I'm just going to keep a list of required fields separately and use this to drive the validation.

Cheers,

Andrew