You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 6Note that the 200ms variance represents a traditional problem in multi-tasking systems. The time spent in Apex Code is wall-clock time and not actual CPU time spent. This means that the system task scheduler (the OS) will influence the wall clock time through the process of multitasking. This is outside the influence of any programming language.sfdcfox– sfdcfox2013-10-16 13:05:36 +00:00Commented Oct 16, 2013 at 13:05
- 2Also, I've observed that for simple tasks, it's now possible to get up to 3,000,000 script statements executed before a limit exception, an increase of 15x.sfdcfox– sfdcfox2013-10-16 13:59:59 +00:00Commented Oct 16, 2013 at 13:59
- 7The move from a script statement limit to a CPU limit will provide more flexibility in most cases, but not all. I have this line of code in a trigger if (myNewObject != myOldObject), which was written with the script statement limit in mind so that we didnt have to iterate over every field on the custom object (there's 200) in the trigger to compare the old value with the new value. We are comparing the old and new object instead which uses up 1 script statement but was actually using 10ms approx of CPU time. It blows up with 1000+ records now.BarCotter– BarCotter2013-10-16 17:42:26 +00:00Commented Oct 16, 2013 at 17:42
- @BarCotter Is it common to have 1000+ items in a trigger? And why over 200 fields? It sounds like an optimization problem on salesforce's part, though, it shouldn't take 10ms to compare two records like that. It'll be fun to try and figure out how to optimize now.sfdcfox– sfdcfox2013-10-23 03:09:10 +00:00Commented Oct 23, 2013 at 3:09
- 3(2) Also, have you noticed that the Governor Limit of 10,000 ms isn't strictly enforced? My tests suggest you can push the limit by ~50% consistently.Scott Pelak– Scott Pelak2013-10-23 19:35:04 +00:00Commented Oct 23, 2013 at 19:35
| Show 3 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. marketing-cloud), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you