Bug 59877 - very slow compilation with await and goto
Summary: very slow compilation with await and goto
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 5.2 (2017-04)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2017-09-30 17:31 UTC by Michal Moskal
Modified: 2017-09-30 17:31 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Slow C# file (14.71 KB, text/plain)
2017-09-30 17:31 UTC, Michal Moskal

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 59877 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Michal Moskal 2017-09-30 17:31:30 UTC
Created attachment 25046 [details]
Slow C# file

The attached 15k C# file takes over 20s to compile (on a fast laptop).

It is generated from a somewhat convoluted JavaScript example with a bunch of if statements and lazy boolean operators by PXT (https://github.com/Microsoft/pxt/blob/csharp/pxtcompiler/emitter/backcs.ts), which I imagine results in a significant number of paths through the source.