Thread overview
Do we have any kind of build profiler?
Mar 19, 2022
Hipreme
Mar 19, 2022
Johan
Mar 19, 2022
Hipreme
Mar 19, 2022
Paul Backus
Mar 19, 2022
Hipreme
Mar 19, 2022
max haughton
Mar 19, 2022
Hipreme
March 19, 2022

We all know we have ldc2 --ftime-trace which generates a "build profiler" for we to drop on chrome's performance tab. But there are some problem with it:

1: We don't really know how much time each CTFE takes
2: Most of its time is usually as abstract as "object generating"
3: Only ldc has that feature
4: In my project, I need to manually adjust the output as it has some problems with windows backslash

There was many projects which CyberShadow done, but they are all deprecated by today. I think we should really be able to do calls for getting the current sys time at compilation time. It would be much better than doing these really complex tools that go deprecated really fast.

I have tried doing template instantiation + TIME, but it seems that TIME only generates a single value.

March 19, 2022

On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:

>

We all know we have ldc2 --ftime-trace which generates a "build profiler" for we to drop on chrome's performance tab. But there are some problem with it:

1: We don't really know how much time each CTFE takes
2: Most of its time is usually as abstract as "object generating"
3: Only ldc has that feature
4: In my project, I need to manually adjust the output as it has some problems with windows backslash

It's nice to hear you are using the feature!
1, 2, and 4 are probably easily improved when you tell us about it in detail. I'm waiting for user feedback, so please submit issues here: https://github.com/ldc-developers/ldc/issues

Btw, I highly recommend Tracy UI (https://github.com/wolfpld/tracy) to look at the profiles. It is much better and faster than chrome.

Thanks,
Johan

March 19, 2022

On Saturday, 19 March 2022 at 13:28:06 UTC, Johan wrote:

>

On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:

>

[...]

It's nice to hear you are using the feature!
1, 2, and 4 are probably easily improved when you tell us about it in detail. I'm waiting for user feedback, so please submit issues here: https://github.com/ldc-developers/ldc/issues

Btw, I highly recommend Tracy UI (https://github.com/wolfpld/tracy) to look at the profiles. It is much better and faster than chrome.

Thanks,
Johan

I have tried after correcting my time trace output. It doesn't seem that it is a valid file for tracy

March 19, 2022

On Saturday, 19 March 2022 at 14:46:26 UTC, Hipreme wrote:

>

I have tried after correcting my time trace output. It doesn't seem that it is a valid file for tracy

You need to use tracy's import-chrome command to convert the profile from Chrome's format to tracy's format.

This post by Dennis has more detailed instructions: https://forum.dlang.org/post/eevoyuwhbuycyzgxsqsc@forum.dlang.org

March 19, 2022

On Saturday, 19 March 2022 at 14:58:48 UTC, Paul Backus wrote:

>

On Saturday, 19 March 2022 at 14:46:26 UTC, Hipreme wrote:

>

I have tried after correcting my time trace output. It doesn't seem that it is a valid file for tracy

You need to use tracy's import-chrome command to convert the profile from Chrome's format to tracy's format.

This post by Dennis has more detailed instructions: https://forum.dlang.org/post/eevoyuwhbuycyzgxsqsc@forum.dlang.org

Humm thanks, it solved the problem over making tracy import correctly the file.

Although it is a bit better than looking into chrome, I cant still find the bottleneck of that profiling. As it shows, I dont have control over 70% of the build time which is still a lot of time.

March 19, 2022

On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:

>

We all know we have ldc2 --ftime-trace which generates a "build profiler" for we to drop on chrome's performance tab. But there are some problem with it:

[...]

How long is the build and how many lines is it.

March 19, 2022

On Saturday, 19 March 2022 at 16:26:08 UTC, max haughton wrote:

>

On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:

>

We all know we have ldc2 --ftime-trace which generates a "build profiler" for we to drop on chrome's performance tab. But there are some problem with it:

[...]

How long is the build and how many lines is it.

Currently 4 seconds the main module. On the ftime-trace log, it has 2300 lines