MPS issue job003679

TitleScheme interpreter running test-leaf has poor CPU utilization
Statussuspended
Priorityessential
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionCompile scheme-advanced in Xcode and profile it using Instruments.

* Using josephus.scm, we see wall-clock time of 8 seconds, of which 7.8 seconds (97%) is assignable to the Main Thread by the profiler.
* Using test-leaf.scm, we see wall-clock time of 16 seconds, of which 0.123 seconds (<1%) is assignable to the Main Thread by the profiler, and 0.180 seconds (~1%) is assignable to the protCatchThread.
AnalysisIt looks as if Instruments (1) scans the call stack each time it gets a sample and (2) abandons the current sample if it is not complete when the time comes to start the next sample. So when the stack is very large (as it is, deliberately, in test-leaf) and the sample interval is small (the default is 1ms) Instruments nearly always fails to complete its sample.
How foundmanual_test
EvidenceNone as yet.
Created byGareth Rees
Created on2014-02-20 16:44:54
Last modified byGareth Rees
Last modified on2014-02-21 14:12:41
History2014-02-20 GDR Created.
2014-02-21 GDR Suspended; see analysis.