Questions tagged [performance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
51 views

Need solution on query optimaisation

i have below code where i am doing 2 queries and updating the account record. list<account> parentAccount=new list<account>(); list<account> ChildAccount=new list<account>(); ...
1
vote
2answers
306 views

Apex batch job performance

I am salesforce admin currently facing performance issue with one of the 3rd party(classy-SF) Integration. Batch job installed from classy are running 300+ times in 24 hours( batch size 1).Each batch ...
1
vote
2answers
332 views

Optimize to avoid too many soql

is there a way to optimize this more? for(Program_Standard__c comp: comps) { List<CertificateComplianceAssociation__c> tempAsocs = [ SELECT Id, Certificate_Type__c, ...
2
votes
2answers
231 views

Performance of SOQL query loop and SOQL query assignment to map

I need to fetch orders by account. Since orders are children of account I can use the aggregation query parent-to-child. Query to be used: SELECT Id, (SELECT Id FROM Orders) FROM Account I can ...
0
votes
1answer
84 views

Optimise Double For Loops in Batch Apex

global Database.QueryLocator start(Database.BatchableContext BC) { return Database.getQueryLocator([SELECT id, (SELECT id, Status, Description, ...
2
votes
0answers
517 views

Lightning Component in Visualforce - Slow Loading in Spring/Summer 18

I know there was the same question in Summer 16 (Lightning Component in VFP - slow loading since Summer 16), but it seems to be the case again in Spring 18 and Summer 18 (I've tested this in sandbox ...
1
vote
1answer
374 views

Cross-Object Formula Fields and Performance

I have been unable to find official documentation about this. But I wonder, is there a documented "upper bound" count at which platform performance degradation occurs due to a proliferation of cross-...
33
votes
3answers
6k views

Why is Schema.describeSObjects(types) Slower Than Schema.getGlobalDescribe()?

I was about to reconfigure some of my code to use the newer Schema.describeSObjects(types) method that I had heard was faster than using a globalDescribe. I made some code to quickly check this and ...
0
votes
1answer
28 views

Send Email Additional To Fields when Millions of Contact

Here is the problem I am facing , I have 1 Millions of Contact While Sending email there is Field called Additional To Which Opens up the Contacts List Page It takes good amount of time to load this ...
3
votes
2answers
690 views

Performance-wise, is it better to query a relationship field or a formula field?

Like AccountName vs Account.Name. The first being a formula field, and the second one a relationship. Since formula fields are like Schrödinger's Cat (the value depends on the time you are getting ...
1
vote
1answer
424 views

How to optimize performance for dynamically add row & delete row functionality in VF Page

It is general scenario to create functionality of add and delete row dynamically. You can refer following link for better understanding of scenario: http://www.infallibletechie.com/2012/06/...
5
votes
1answer
2k views

Writing too much to debug log increases heap and cpu time

I have just observed that writing to debug log using System.debug increases heap size as well as CPU time. Is this normal. Please see the screenshot below for the comparison. The first one with so ...
4
votes
2answers
1k views

Formula field in SOQL - Performance Impact

Scenario Let's say I have two custom obejcts - Student and Class. The Class object is connected with object Student through lookup relationship. The Class object also has a formula field (...
1
vote
1answer
479 views

Is that possible to enqueue more than one action? Please suggest

I just read the best practices article for the Lightning and I am wondering is that possible to have more than one enqueueaction in client controller js? Please suggest. There is some hint given in ...
10
votes
1answer
2k views

How to implement a professional infinite/virtual scrolling in Lightning

I have a custom Lightning grid component (like and editable lightning:datatable) for which I need infinite scrolling to display thousands of rows without bringing the customers browser to a halt. I ...
1
vote
1answer
458 views

Reduce servertime loading dynamic piclist on community page

How do I reduce servercall load/time from a community. I build a dynamic picklist component which loads on the page as checkboxes. I use this component 5 times on the page. It takes about (3000ms) ...
12
votes
1answer
468 views

Why is my Lightning App inside a Managed Package extremly slow during its bootstrap phase (but not in the DEV org)?

I do have a managed package that contains a Lightning app (myApp.app) which contains various custom Lightning components. When I install the package in any org and open the app, it takes a very long ...
12
votes
1answer
691 views

What is the performance penalty for Deterministic Platform Encryption?

Spring 18 included a beta release of deterministic encryption for the SFDC Shield Platform Encryption product. Deterministic encryption imposes fewer issues with your existing code base / metadata ...
4
votes
2answers
422 views

Bulk deletion of Case Team Member records, data skew, and performance issues

We're proposing to delete no-longer-relevant Case Team Member records, numbering about 4.3 million (2.8 million total Cases). I'm concerned about the performance implications that might be caused by ...
17
votes
2answers
2k views

Effectively profile & speed up slow Lightning components (using Chrome Lightning Inspector)

Note: 5 years ago I asked the same about Visualforce here and it helped to collect a lot of knowledge. So let me try this again for Lightning. I am currently working on a quite complex Lightning page ...
0
votes
1answer
32 views

Advice for optimizing my search for available times for user(s) given list of their events. (Currently using for loop inside while loop) [closed]

I am finding the next 5 available time slots for a user or group of users based on events they have on their calendar. Currently, I have a while loop that will start at the selected time, then loop ...
3
votes
0answers
84 views

First event/event relation insert taking a while

I have an application that inserts events and event relations in an org's database and has a loading icon to prevent the user from doing anything until the event and relations are properly created and ...
7
votes
1answer
2k views

How exactly SOQL query time out works?

I have two Apex classes implementing Schedulable and Batchable as follows: Class implementing Schedulable interface: public class ScheduleClass implements Schedulable { public void execute(...
0
votes
1answer
339 views

Empty Your Recycle Bin Performance

Empty Your Recycle Bin or Empty Your Organization's Recycle Bin works very slow. Is there some faster way to empty the salesforce recycle bin.
8
votes
0answers
327 views

Make custom, in-memory "Lightning Data Service" work

Lightning Data Service is great. Multiple components are magically linked to database records. When records change in the db component show that change. Imagine this to work without saving change to ...
4
votes
1answer
162 views

In a Salesforce Number field, how much performance impact does its length have?

Does a 2,2 field perform noticeably better than a 16,2 if the same value (e.g. 24.45) is stored in the context of Apex DML Formulas whatever I forgot, please add To clarify: This question ...
0
votes
1answer
208 views

Query for non openers from several emails timing out

I can write some SQL, but I'm not good at knowing how to make things perform better. My query below works with one JobID, but I need to pull openers from 5 jobs. When I do this it times out. I'm ...
6
votes
2answers
949 views

Lightning Component Memory Leak Issue

Not sure if this is a Lightning bug. One of my Lightning pages consume lots of memory (around 4GB) when processing 4000+ records. I found out that the root cause is : when using component.set to ...
2
votes
2answers
364 views

Best Practice for bulk removeEnd() edits

I have 35+ words that I need to search for within a string. If the string ENDS with any of the 35+ words then I need to remove them. I am using .removeEnd() and it works great. My issue is my method ...
3
votes
1answer
162 views

Apex Trigger: Is it better to update the current collection or create a new collection with only the records that meet the conditions?

Wanted to see what the 'better' practice is or which would provide better performance. Let's say I have a trigger like this: trigger ProjectTrigger on Project__c (after update) { ...
0
votes
1answer
67 views

Getting CPU time error

I tried to make use of maps but still getting CPU time error. Code: //@AuraEnabled public static Map<String, Integer> getDateRangeMap() { Map<String, Integer> mapToReturn = new Map&...
0
votes
2answers
115 views

Iterating with Map with Keys vs Values . Which is more efficient?

Iterating with Map with Keys vs Values : As in Apex we need to write code efficiently for avoiding memory issues and CPU time limit everywhere, I need to understand how to iterate over a map ...
4
votes
2answers
162 views

Prevent process builders from evaluating

In a current implementation, I am running into performance issues, the issues happen because there are a lot of process builders on several objects. I am creating multiple records at the same time, ...
1
vote
1answer
1k views

Response time benchmarks for Salesforce APIs

For all the various APIs exposed by Salesforce like Bulk, Composite etc. each have their own developer guides which include like how to use them, and various limits applicable to them. But I didn't ...
14
votes
1answer
955 views

Lightning Components: Why is the rendering of 3-level nested <aura:iteration>'s so slow?

I have been working with a nested iteration and it is causing a delay of >3 seconds AFTER loading things from the APEX controller. The APEX response itself is fast, so I'm not looking for any APEX ...
6
votes
1answer
783 views

Soql for loop heap size. How to decide between speed and memory mangament

I am wondering how to decide between heap size and processing time. This probably rather trivial but I have been researching for about an hour. The two images I used system.debug(Limits.getHeapSize());...
1
vote
2answers
1k views

Load all necessary images on init in Lightning component

I have a lightning component that displays an image of the US map. The map is divided into 13 different regions based on a criteria. I am using image map to identify different regions on the map. Now ...
16
votes
1answer
4k views

Lightning Components: why are subsequent invocations of $A.enqueueAction() so super SLOW?

I have an Lightning Component with an controller containing a sever side APEX-action like this @AuraEnabled public static Object myServerSideAction_1() { return null; } @AuraEnabled public static ...
1
vote
2answers
762 views

How to optimize soql query?

I have this user case where a community user needs to see the appointments of all the contacts in his parent account.Appointment has a lookup relationship to contact. Right now, in the first soql ...
5
votes
1answer
69 views

component.get and javascript object references

In a lightning component, the recommended way to store data is in an <aura:attribute>. If I store a rich structure in an attribute and want to modify just some specific values, what is the ...
5
votes
2answers
1k views

How to query for records that have specific values on multiple fields

Let's say that I have to query Contact records with: FirstName as A, LastName as B, Company as C, or FirstName as K, LastName as L, Company as M, or FirstName as X, LastName as Y, Company ...
2
votes
2answers
1k views

What is more effecient , using SOQL AVG() or to query all records and calculate their average

Is it efficient to calculate AVG using aggregate function, using a group by clause. Like: (Select Designation__c,AVG(Salary) from Employee__c GROUP BY Designation__c) Or is it efficient to fetch all ...
4
votes
1answer
377 views

Lightning performance with over 300 Data categories in knowledge

I was surprised to read from the lightning knowledge guide that for orgs with over 300 Data Categories, if switching to lightning knowledge : "you may experience slower performance." I was under ...
9
votes
1answer
5k views

Why do we need to destroy lightning components?

I was looking at this blog post about Dynamically Instantiate and destroy Lightning Components – Modal dialog component and author is instantiating, destroying child component from the code. But I ...
1
vote
3answers
466 views

Two debug logs when loading one visualforce page

I have written a lengthy visualforce page for an account plan. After working almost all of the kinks out, I am now concerned with performance. Simply put, the page takes longer to load than I think it ...
4
votes
3answers
1k views

Set performance - is using addAll and removeAll more performant than for loops?

I am wondering what is more performant in getting the difference between two sets: Something like this: method(Set<Id> a, Set<Id> b) { Set<Id> result = a; result.addAll(b); ...
10
votes
2answers
5k views

What are the best ways to achieve lazy load in Lightning components?

I have come across many discussions to improve the performance of Lightning components and everybody has their own approach and solution. What do you reckon is the best way to implement the concept of ...
1
vote
1answer
211 views

Trigger hitting CPU Limit

I've just written my second trigger and it seems that I'm needing to learn more about how to optimize my code. My trigger runs through the campaign members of a campaign and changes the member status ...
2
votes
1answer
56 views

Is there a Salesforce equivalent of Unica Optimize?

I am somewhat familiar with Unica's Optimize engine. This compares different campaigns customers are eligible for to determine which one they should be placed into in order to get the optimal business ...
6
votes
1answer
1k views

Pros and cons of generic SObject list vs multiple lists of objects

For one of the requirements I have to write code to update multiple records of different objects. Originally I was planning to do the obvious: get needed records, change some value, update these lists,...

1 2
3
4 5
7