Profiling your script with the built-in profiling to measure performance characteristics.

You can use the built-in profiler to measure performance characteristics of your script.

how to run the profiler

To launch a profiling run, first tap on the script properties in the editor, then tap on the profile button.

how to understand the profile results

After you complete a full run, you can browse your code that is now annotated with profiling information. When you leave the editor, the profiling information is lost.
Different shades of red indicate how expensive a particular line in the code is. On the right, you see an annotation of the form x ms / n. This means that the line was run n times, and the cumulative time for all times is x milliseconds.

crowd profiling information

After you publish your script, profiling information may be collected anonymously when your script is run by someone. You can view this information by going to the published script page in the hub, then tap on insights, and then tap on profile. Learn more about insights...

view in web app

View this page in the TouchDevelop Web App to view related docs, write comments, or request more docs.