You need to sign in to do that
Don't have an account?
Is CPU time limit enforced at all?
lead[] ls = [Select l.Website, l.Title, l.SystemModstamp, l.Street, l.Status, l.State, l.Salutation, l.SICCode__c, l.Rating, l.ProductInterest__c, l.Primary__c, l.PostalCode, l.Phone, l.OwnerId, l.NumberofLocations__c, l.NumberOfEmployees, l.Name, l.MobilePhone, l.MasterRecordId, l.LeadSource, l.LastName, l.LastModifiedDate, l.LastModifiedById, l.LastActivityDate, l.JigsawContactId, l.Jigsaw, l.IsUnreadByOwner, l.IsDeleted, l.IsConverted, l.Industry, l.Id, l.FirstName, l.Fax, l.EmailBouncedReason, l.EmailBouncedDate, l.Email, l.Description, l.CurrentGenerators__c, l.CreatedDate, l.CreatedById, l.Country, l.ConvertedOpportunityId, l.ConvertedDate, l.ConvertedContactId, l.ConvertedAccountId, l.Company, l.City, l.AnnualRevenue From Lead l where lastname='xxx3'];
for (Integer i = 0; i < 8000; i++) {
lead[] newl = new list<lead>(new set<Lead>((new Map<Id, lead>(ls)).values()));
}
Number of SOQL queries: 1 out of 100
Number of query rows: 101 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Number of code statements: 8002 out of 200000
Maximum CPU time: 13519 out of 10000 ******* CLOSE TO LIMIT
Maximum heap size: 89153 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10
Yes, but it looks like you are getting about 15 seconds of CPU tim instead of 10.
I ran this from the Dev console:
17:15:48.367 (15367189946)|EXCEPTION_THROWN|[2]|System.LimitException: Apex CPU time limit exceeded
17:15:48.367 (15367274638)|FATAL_ERROR|System.LimitException: Apex CPU time limit exceeded
AnonymousBlock: line 2, column 1
17:15:49.242 (15367386631)|CUMULATIVE_LIMIT_USAGE
17:15:49.242|LIMIT_USAGE_FOR_NS|(default)|
Number of SOQL queries: 0 out of 100
Number of query rows: 0 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Number of code statements: 1458234 out of 200000 ******* CLOSE TO LIMIT
Maximum CPU time: 15115 out of 10000 ******* CLOSE TO LIMIT
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10