Better performance for --showdescription
See original GitHub issueCurrently it’s taking between 4 and 5 seconds. Is there anything that can be done about that? Ideally there would be some way to get it under 500ms.
I added target name autocomplete to my bootstrapper which executes --showdescription
, but it freezes the console for 4-5 seconds every time I press tab. 200ms would be so cool though…
I know Cake takes a while to check dependencies and compile, but no one ever creates targets that only conditionally appear, so in my mind we wouldn’t even have to compile the script to obtain the list of calls to Target
. But if you wanted to be absolutely completely safe, the --showdescription
logic could look like this:
- Parse the script file’s syntax
- Locate all usages of the name
Target
- If every usage of
Target
is a call with a literal string name and the call is not nested under a conditional, add it to the list. Otherwise, finish compiling the script and discover the list the old way.
I’m pretty sure the fallback will never actually be needed though.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
What are some good strategies for improving the serial ...
First of all, as skillman and Dan have pointed out, profiling is essential. I personally use Intel's VTune Amplifier on Linux as it...
Read more >General C++ Performance Improvement Tips [closed]
Off the top of my head, one good general performance practice is to pass heavyweight objects by reference, instead of by copy. For...
Read more >NET Performance Tips - .NET Framework
Explore performance tips to improve the execution speed of a program in .NET. See tips for boxing and unboxing, strings, and finalizers.
Read more >5 Tips to Improve Performance of C# Code
5 Tips to improve performance of C# code. In this article, I show you 5 best practices of C# programming. I have learned...
Read more >Find, Fix, and Avoid Performance Problems in C# .NET
This article will show 10 best practices on dealing with performance problems, starting with when you need to deal with them at all....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently it’ll codgen, reference dependencies, compile and execute the C# code. for it to be 200ms likely would have to not do that but rather some specific
--showdescription
parsing code.Unsure if this is a a high priority or worth it at the moment, a potential work around would be to in boostrapper use powershell to extract the needed info i.e. something like
that takes around 8 ms on my machine on cake’s build.cake, resulting in an array containing
where it would fail would be if tasks are defined in any other file external to take i.e. included via
#load
which is one of the complexities as some files make be located in nuget packages needed to be fetched an loaded.It this was tracking work that you still want to do, please feel free to reopen! Otherwise, cleaning up due to inactivity.