Skip to content
Snippets Groups Projects
Commit 62624a36 authored by Sander Snoo's avatar Sander Snoo
Browse files

After exception re-compile without comments

parent 4a00af3e
No related branches found
No related tags found
No related merge requests found
......@@ -845,11 +845,19 @@ class UploadAggregator:
times.append(['done', time.perf_counter()])
# NOTE: compilation is ~20% faster with listing=False, add_comments=False
# NOTE: compilation is ~25% faster with listing=False, add_comments=False
if UploadAggregator.verbose:
self.program.compile(listing=True, json=True)
else:
self.program.compile(add_comments=False, listing=False, json=False)
retry = False
try:
self.program.compile(add_comments=False, listing=False, json=False)
except Exception as ex:
retry = True
print(f'Exception {ex} was raised during compilation. Compiling again with comments.')
if retry:
# retry with listing and comments.
self.program.compile(add_comments=True, listing=True, json=True)
times.append(['compile', time.perf_counter()])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment