Questions tagged [performance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
2answers
419 views

Trigger performance and readability - matching text multiple times

If I was trying to compare a lot of strings, my code is quite easily read (I feel) but I know there is a lot of duplication. Especially when the field values are the same, is there a tidier way of ...
0
votes
1answer
42 views

What is performance gain of using Composite API over Custom Apex REST API?

I want to know whether using Salesforce Composite API will give me any performance gain or not in my scenario. I am not expert in Salesforce and don't know much about Composite API. So, before I move ...
3
votes
1answer
56 views

How can i create a Map for unrelated objects?

Background We create shadow records for Contacts that are Inactive (record type) and I am working on building a UI for the user to Activate one or more shadow records associated to that Account. ...
0
votes
1answer
34 views

Efficiency issue when rendering custom aura component

We have a custom aura component (see picture) which has to show a list of records from a custom object where the user can select other other records (from other custom objects) which will be ...
10
votes
4answers
776 views

Should trigger handlers be static or non-static?

For a generic trigger, are there circumstances where one of the following patterns is better than the other? trigger ObjectTrigger on Object (after event) { ObjectTriggerHandler oth = new ...
0
votes
2answers
38 views

Benefit of actually excluding records with logic directly in Trigger vs. TriggerHandler

Is there any performance benefit of excluding records in logic directly in the trigger to avoid instantiating another class (TriggerHandler) that would essentially do the same thing? I know best ...
0
votes
0answers
38 views

What is the page 'one:recordActionWrapper' in Lightning performance page reports?

I'm working on Lightning pages performance and using the Lightning Usage Metrics and the Lightning Usage objects in reports. There is 1 page that comes up as being frequently used : one:...
0
votes
0answers
15 views

Pardot form takes a few seconds to submit

I have pardot forms embedded in two websites and it take a couple of seconds to submit. In the mean time the user can click the button twice, sometimes thrice and it generates more than one form ...
1
vote
1answer
37 views

Is it possible to check the time taken by a Salesforce Record to load when we we view/open the record?

Can i find the time taken by my record page to load in Salesforce Dev Console.
2
votes
0answers
34 views

Why is NPSP (Nonprofit Success Pack) dramatically slowing down my code?

I noticed recently in the performance timeline of an Apex test that NPSP is taking an extraordinary amount of time on the database during our tests at mulitple points. (see picture - all highlighted ...
2
votes
1answer
33 views

Can postMessage in doInit with huge dataset cause any memory issues in Chrome?

We have a VF page which has datatable initialized. This VF page is embedded inside an iframe in a lightning component. For now case records are 200-300, so the page loads quickly as loading of ...
3
votes
1answer
38 views

Does the latest API on classes,triggers,and components provide a performance benefit over older APIs?

My thought is "no", but wanted to see if anyone had any information on this. I would assume the versions simply control how you can interact with the features in Salesforce (ex. methods you can use, ...
0
votes
1answer
28 views

Which one is the Optimize one when consider in a Batch?

Which one is the best way to optimize the performance if optimization available, Option 1: public without sharing class AccountTrigger extends TriggerHandler{ List<Id> accountIds; public ...
0
votes
0answers
33 views

Does indexing a custom field in the below scenario will help with Non-Selective query error?

Background : I have a object(Foo__c) with two columns(Value__c, Type__c). Type__c is a picklist, with two options(A and B) and Value__c is a text field. Running into Non-Selective query error when ...
0
votes
1answer
92 views

Lightning console : Crash solution? (Definitely memory leak from inside lightning)

As per documentation : https://help.salesforce.com/articleView?id=console2_technical_requirements.htm&type=5 We should 8 GB Ram out of which 3GB needs to be allocated to Salesforce tabs. ...
0
votes
0answers
26 views

require vs a direct access for API modules in SFCC

What approach is better to use preformance wise require or a direct access for API modules in SFCC? For instance, what will be better: to write dw.io.File every time I need the File or require("dw/io/...
0
votes
1answer
110 views

can too many validation rules cause a performance issue with large data - Apex CPU Time?

I have a bulk update process which effects updates records in more than one salesforce objects like - Account, Contact, Contract , Opportunity and Oppt Line Item. This bulk process does not update ...
2
votes
0answers
27 views

Can Lookup Field be part of Composite Index?

I have an sObject say student( ..., student_name text,favourite_teacher lookup,marks integer) By the documentation , lookup fields (favourite_teacher) will be indexed by default. Is it possible ...
0
votes
1answer
22 views

Web service end to end testing

Background: I have created a lightning quick action button, when i click the button, the apex controller makes a GET Http callout to a 3rd party web service. The web service returns a JSON, and ...
0
votes
1answer
50 views

Error: variable mygif has been optimized out

I want to use a gif static resource as a loading image in a LWC. I import it in the JS file: import mygif from '@salesforce/resourceUrl/mygif'; and use it in the HTML file: <img src={mygif} /&...
4
votes
1answer
58 views

Need help in optimizing the below helper class

Logic : For any new record inserts for 'Properties' object, check if its Account_Ref_Ext_ID__c equals to 'Account' object's Chris_Account_Number__c. If it matches, assign Account id to properties ...
1
vote
2answers
30 views

How a non-prod BU affects a Prod BU on reputation/metrics terms?

I received a request from a PO to explain her about how a test could affect the reputation or metrics. I explained that for SFMC probably there's no differences among Business Units (BU) but in terms ...
2
votes
1answer
41 views

Email Performance Metrics: switching away from the content builder

We recently started using AMPscript for our emails instead of manually adding images one by one. Before, we used to alter the pixels of the images to the desired size (400x400 pix) and then would ...
1
vote
0answers
45 views

Lightning console methods does not respond after keeping console tabs open for sometime

There is a wired behavior observed in our lightning console app. After few tabs and subtabs opens up and we keep the browser open for an hour or so, the lightning methods top open tab and subtabs ...
2
votes
1answer
201 views

Does quantity of data extensions impact performance?

In Marketing Cloud, if I begin deleting data extensions, could that do anything to improve the overall loading speed of the UI in the various contexts where Contact Builder data is being referenced?
1
vote
0answers
18 views

Post processing slowness on dev org

We have build custom API on slaesforce. This API is call from C# multilayered application. it stats 1000 threads and hit the custom api almost at same time. Salesforce receive and process all this ...
0
votes
1answer
45 views

Using EncryptSymmetric in a Content Block

This is not a question on how to use EncryptSymmetric. I’d like to ask if anyone knows about how well it performs. If we are encrypting a personalised payload that will be added to an outbound link in ...
0
votes
1answer
94 views

cdn for static resources

I'm analysing a performance problem and currently looking for more information around the usage of CDN for static resources that are part of our App. In previous releases, Salesforce released two ...
1
vote
1answer
16 views

Can the below code be Optimized and include the logic to check for related opportunityteammember records before updating checkbox to true?

Need help in Optimizing below code. Requirement is to update "opportunity shared" checkbox on "Opportunity" object whenever opportunity is un-shared. (Delete trigger on "Opportunityteammember" ...
0
votes
1answer
31 views

Question on Negative operator SOQL Index or Table scan

I was reading SFDC documentation and they state that using != or Contains will almost run the query in table scan. With that said, we have 5 Million case records in production. When i check the ...
3
votes
0answers
149 views

Why are these calls into CPQ taking so long?

I'm working through a problem here where we have a website that making calls into Apex code that's taking 8 seconds to add an item to a quote, and I wonder if I could get some help understanding if we'...
0
votes
1answer
129 views

Loading Iframe in lightning component, slows down the loading time of page. Any alternative?

We have many iframes with relative visualforce page urls inside lightning component. And these all lightning components are displayed on Lightning Sales Console app inside a flexipage. This results ...
8
votes
1answer
265 views

Most efficient way to switch on SObjectType?

It is a bit odd we can't evaluate a switch statement directly on SObjectType, so I am trying to determine conclusively which workaround is the most efficient. Just to verify, I tried to compile this ...
1
vote
1answer
43 views

Salesforce performance after installing many appExchange or managed package apps or products

Does installing too many appExchange apps on Salesforce instance has any impact on performance of that instance? I mean every app will have its own triggers or automation and thus consuming power/...
0
votes
2answers
20 views

Specific numbers for report performance issues

According to the documentation, there are a few items that can make report performance worse. These include: Querying too many objects Dealing with intricate lookups Report has too many fields Does ...
0
votes
0answers
19 views

lightningselect performance

i am currently rendering a list with ca 50 records which takes very long. I have figured out that this is due to the lightning:select being in each row. The options are rendered through aura:iteration....
1
vote
1answer
88 views

SOQL and Indexes

I am trying to understand more about "SOQL Query Performance" topic and I'm reading all the Salesforce docs. I have a doubt when we have a WHERE clause with an AND condition. The two docs on this ...
0
votes
1answer
60 views

Capturing page performance statistics with Event Monitoring?

I've finished the trailhead for event monitoring. In the trail head it mentions "Optimize performance — Sometimes it’s hard to determine the cause of slow page performance in your organization. ...
1
vote
1answer
191 views

Capturing Lightning Performance (Page Load Time) without any special tools?

I have been requested to come up with a report or analysis that could "show performance of the page load for a certain period of time or something similar" Business problem: Some customers currently ...
3
votes
3answers
96 views

Array notation for List<List<Sobject>>

In an attempt to be as byte pinching as possible(personal goal), I have a question some time on Google has not been able to answer. I did look at some Java documentation to try and resolve the issue ...
1
vote
2answers
125 views

How can I efficiently loop through opportunities on a list of accounts?

Currently we have a few nested for loops in our codebase that are doing what is mentioned in the question, but if we data load a large amount of records we run into CPU time errors. I am wanting to ...
5
votes
0answers
258 views

Apex trigger takes a lot of time to access items in list

I have a simple Contact trigger in a sandbox org that is exhibiting some serious performance issues. After doing some debugging it looks like the issue boils down to accessing the items inside Trigger....
3
votes
0answers
27 views

Instance Switching

Has anyone had experience in requesting a Salesforce org be migrated from a different geographic instance to another? Our org was setup a number of years ago (10+) by someone in our US office. Our US ...
0
votes
1answer
42 views

Is there a better way to create related records when creating test data?

I am trying to create a large set of test data along with child records and this is what i came up with. Could anyone let me know if there's a better way to achieve the same? Integer countStart = ...
11
votes
2answers
387 views

Access to SObject Schema in Apex is very slow after API v44

We needs to use Schema and DescribeSObjectResult classes to get all SObject in the user's organization. But we noticed performance problem after upgraded to API v44. The following code could reproduce ...
10
votes
1answer
179 views

Drawbacks of using SObjectField.toString() over SObjectField.getDescribe().getName()

I often do '' + field where field is an SObjectField to get the field's API name. I like that much more than the clunky verbose field.getDescribe().getName(). So is there a reason I should not do it ...
1
vote
1answer
41 views

How do I optimize searching 3,000 records for an email that matches one on a lead?

Scenario A New Lead is inserted, if it matches criteria, the lead ownerid is Updated based on an email field on the lead. Problem Write code that takes the email address and queries all Users for ...
0
votes
1answer
71 views

Optimize code by reducing many If-else Conditions?

If-else code which I have written. I want to optimize it. (Using maybe Collection). Can someone show me how to do it? if(form.first_name.value == '' && form.last_name.value == '' &&...
7
votes
1answer
130 views

Slow scratch orgs causing Apex CPU time limit to be hit about 20% of the time - any workarounds?

We have an SFDX build set up that runs our 2,800 tests against 6 different scratch org configurations in parallel. But every build fails on what seems like a random one of the scratch orgs (i.e. it ...
0
votes
2answers
31 views

Is there any other impact of using serial bulkUpdate/Insert other than slow speed?

I am using the serial mode of bulkUpdate/Insert. I am just wondering if there any other impacts apart from the speed.