Dennis Korpel has a new tutorial out on the foundation's YouTube channel, showing how to employ LDC's -ftime-trace option to improve your project's compile times. This can come in handy if you're heavily using metaprogramming or CTFE.
Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
May 01, 2023 Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
May 01, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Monday, 1 May 2023 at 14:00:23 UTC, Mike Parker wrote: >Dennis Korpel has a new tutorial out on the foundation's YouTube channel, showing how to employ LDC's -ftime-trace option to improve your project's compile times. This can come in handy if you're heavily using metaprogramming or CTFE. Thanks Dennis for making the video. Does anybody have an idea about how change the txt output to trick code-folding editors in enabling folding the timetrace2txt output? Two additions:
cheers, |
May 01, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan | On Monday, 1 May 2023 at 17:56:21 UTC, Johan wrote: >On Monday, 1 May 2023 at 14:00:23 UTC, Mike Parker wrote: >Dennis Korpel has a new tutorial out on the foundation's YouTube channel, showing how to employ LDC's -ftime-trace option to improve your project's compile times. This can come in handy if you're heavily using metaprogramming or CTFE. Thanks Dennis for making the video. Does anybody have an idea about how change the txt output to trick code-folding editors in enabling folding the timetrace2txt output? Looks like indentation alone would already do the trick for SublimeText. So I'll see about implementing an cheers, |
May 02, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Monday, 1 May 2023 at 14:00:23 UTC, Mike Parker wrote: >Dennis Korpel has a new tutorial out on the foundation's YouTube channel, showing how to employ LDC's -ftime-trace option to improve your project's compile times. This can come in handy if you're heavily using metaprogramming or CTFE. cool, thanks for the tutorial! These tutorials can help show things that are used commonly, that can ideally be simplified in IDEs such as code-d/serve-d as well. The tracy viewer or web viewer could for example be embedded in the IDE. Compilation times for modules and methods could also be shown inside the editor / code. There was once an experimental setting in code-d with dmd for imports which just tried compiling with a single import, but this would be much more accurate and be able to display times relative to the total compilation time. |
May 02, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan | On Monday, 1 May 2023 at 17:56:21 UTC, Johan wrote: >Two additions:
More tips:
Just put this in your dub.json:
DUB will then output the trace in lastest |
May 02, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan | On Monday, 1 May 2023 at 17:56:21 UTC, Johan wrote: >
Good suggestions. This video I wanted to focus on setting it up and getting started, but I might do a follow up with more advanced usage. |
May 02, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Piolat | On Tuesday, 2 May 2023 at 12:28:32 UTC, Guillaume Piolat wrote: >More tips:
True, but you don't get CTFE tracking and the timetrace2txt tool with those earlier versions, so I wanted to make sure viewers don't get tripped up by that when following the video. |
May 05, 2023 Re: Tutorial on LDC's -ftime-trace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan | On Monday, 1 May 2023 at 18:12:47 UTC, Johan wrote: >On Monday, 1 May 2023 at 17:56:21 UTC, Johan wrote: >On Monday, 1 May 2023 at 14:00:23 UTC, Mike Parker wrote: >Dennis Korpel has a new tutorial out on the foundation's YouTube channel, showing how to employ LDC's -ftime-trace option to improve your project's compile times. This can come in handy if you're heavily using metaprogramming or CTFE. Thanks Dennis for making the video. Does anybody have an idea about how change the txt output to trick code-folding editors in enabling folding the timetrace2txt output? Looks like indentation alone would already do the trick for SublimeText. So I'll see about implementing an Added a very simple option for this: https://github.com/ldc-developers/ldc/pull/4391 Works well with SublimeText (https://www.youtube.com/watch?v=80UUPMUAP-g), makes it much easier to navigate through large traces. Dennis commented on this in his video (having to switch to a better viewer than just simple text); hope this helps a little. cheers, |