currently we are having issue with an CPU Limit. We do have a lot of processes that are most likely not optimized, I have already combined some processes for the same object but it is not enough. I am trying to understand logs rights now - as you can see on the screenshots, there is one process that is being called multiple times (I assume each time for created record). Even if I create, for example, 60 records in one operation/dml statement, the Process Builders still gets called 60 times? (this is what I think is happening) Is that a problem we are having right now? If so, is there a better way to do it? Because right now we need updates from PB to run, but I expected it should get bulkified or something like that. I was also thinking there might be some looping between processes. If there are more information you need, please let me know. Thank you.
Salesforce Apex CPU LImit
329 Views Asked by LuV At
1
There are 1 best solutions below
Related Questions in SALESFORCE
- UI Component(Table Rows) Taking Too Much too in LWC
- Twilio Salesforce integration (Chat Transcripts)
- How can I automatically apply dark and light themes using the Lightning Email Template Builder in Salesforce based on the user's system preferences?
- Sending Slack Message to channel from salesforce flow
- How to redirect to parent object after child record creation
- Creating File in Drag and Drop Enabled File Cabinet in Netsuite using Rest API from Salesforce
- tsql functions like REPLACE() failing in azure data factory pipeline connected to salesforce
- An unexpected error occurred. Please include this ErrorId if you contact support: 1878486530-323938 (1541428280)
- My requirement is that I have to create DLRS for 'the date when the most recent email was received'
- Declarative Rollup Summaries Deployment
- Trouble updating a Field in Salesforce via a Python Script
- Why custom favicon for Salesforce-powered website not showing consistently in Google search results
- Salesforce chatter photo upload trigger
- Disable Azure DevOps Pull Request being completed when Using Copado
- AppFlow s3 to Salesforce upsert fails
Related Questions in RECORD
- Documentation comments for record types with primary constructors in C#
- Can not switch camera while recording with camera plugin, setDescription working but preview doesn't change
- Enforcing Instance Creation of Record Types Through Specific Methods in C#
- Flutter sound package file save and post api
- android how record video from media3 playerview surfaceview
- Java Record "toString()" mask sensitive fields
- Declaring a set of a set in Mosel
- Bunch of errors that aren't valid, probably because of formatting but I can't crack it
- Record Triggered Flow Error- failure to insert records
- Flutter record sound on background
- Question about Record Pointer as a Function Variable
- Convert record to string with custom delimiter
- How do I ensure my 2 procedures update the same record during the same session
- Record video in Next js socket io
- How to Instantiate a Custom Data Type with Record Syntax and Multiple Constructors
Related Questions in APEX
- Error in running apex code in vs code studio
- Oracle APEX - Enabling Persistent Authentication Breaks Deep Linking
- How to Change this Pl/SQL Codes to handle multiple roles in Apex?
- Salesforce chatter photo upload trigger
- Limits for SOQL INNER QUERY in Apex
- Salesforce Deployment: Method does not exist or incorrect signature"
- APEX class to import data to custom object
- Apexcharts How to use different color on opposite bar chart begin on specified value (not zero)
- What could cause a apex scheduled batch class to run but not update records even when unit tests have passed?
- When button clicked on load it adds 'undefined' to array
- conga template specific for some object like invoice
- Salesforce SOAP API: Where do I get the EnterpriseConnection class from?
- Email should go through the apex class
- Salesforce: Upload Apex Trigger via Java
- Programmatically authenticate External Credentials Principal In Named Credentials
Related Questions in PROCESSBUILDER
- How to run a Python script hosted on a different server remotely from a Java application hosted on another server?
- my Java command Process builder never exit
- Getting CreateProcess error=5, Access is denied while trying to launch the emulator programmatically from Java Appium code
- Should an open source library with a blocking method offer an asynchronous option for execution?
- How to pass password with special character in 7z cmd ProcessBuilder
- using process builder to get the stream of this process
- Open Url in given browser using process builder
- Java ProcessBuilder not immediately terminating mysql import command with process.destroyForcibly()
- Checkmarx command line injection
- Reading input stream from ProcessBuilder pipeline in build.gradle.kts hangs
- How to use BufferedReader and BufferedWriter to interact with a process's console using processBuilder
- To Open another Application from main Application in JavaFX VsCode
- How can I read stdout/stderr contents from a Process which is still running?
- ProcessBuilder don't return result of JQ select
- Image processing with JavaFX and C; problem getting data from C to Java
Related Questions in CPU-TIME
- Measuring CPU Time utilized by a piece of code in Java with high accuracy to limit the maximum CPU time utilization
- Extended time measurement with CPU_TIME() in fortran with loops located after the last call?
- Script to monitor cpu time for each process for multiple Windows systems
- MPI with C slower if more processes are used
- Calculate CPU usage from process.cpu.time
- Salesforce Apex CPU LImit
- How to calculate expected CPI and cpu time when instruction types are given?
- Problem about cpu time and wall time in jupyternotebook
- Does context switching usually happen between calling a function, and executing it?
- Computing time for an Open MP fortran program is the same as the sequential version
- How to calculate global CPI with dynamic instruction counts and determine which computer is faster?
- VisualVM Profiler: How to test CPU Time for a method with varying parameter sizes?
- How to diagnose high self time in VisualVM?
- How to convert RDTSC Clock ticks to Real Time in C or C++?
- CPU Time Limit does not work in docplex api in python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?



Well, yes, the process builder will be invoked 60 times, 1 record at a time. But that shouldn't be your problem. The final update / create child records / email send (or whatever your action is) will be bulkified, it won't save 1 record at a time. If the process calls some apex actions - they're supposed to support passing collection of records, not just single record.
You maybe looking at wrong place. CPU time suggests code problems, not config (flow, workflow, process builder... although if you're doing updates of fields on "this" record it's possible you'd benefit from before-save flows). Try to compare timestamps related to METHOD_BEGIN, METHOD_END for triggers, code methods (including invocable action / process plugin interfaces).
Maybe there's code that doesn't need to run because key fields didn't change, there's nothing to recalculate, rollup. Hard to say without seeing the debug log.
Maybe the operation doesn't have to be immediate. Think if you can offload some stuff to "scheduled actions", "time based workflows" or in apex terms "@future, batchable, queueable". But they'd have to be relatively safe to run, if there's error - it won't display to the user because the action will be in the background, you'd need to handle the errors manually (send an email, create a record, make chatter post or bell notification).
You could try uploading the log to https://apextimeline.herokuapp.com/ and try to make sense out of that Gantt-chart-like output. Or capture the log "pro" way, with https://help.salesforce.com/s/articleView?id=sf.code_dev_console_solving_problems_using_system_log.htm&type=5 or https://marketplace.visualstudio.com/items?itemName=financialforce.lana (you'll likely need developer's help to make sense out of it).