I have a .NET solution which contains multiple projects with in it.
Have identified some potential hot spots of the project which can be improved.
E.g. Considering a ternary operator wherever it is possible.
The question is this:
if statements with an equivalent ternary operator will usually have no impact whatsoever on the generated code. The compiler is quite good at optimizing these things to the exact same sequence of instructions regardless of how you write them at a high level.
Generally, dumb reduction of the number of lines of code without any actual restructuring of the code will not have any effect on the size of the project.
Restructuring the code may have an effect, but unless you have really stupid things going on, like completely unused or completely useless code, you have to be smart in how you restructure things, and it requires a lot of work.
Usually, performance and loading time improvements require more code, not fewer code. For example, if you are hitting a certain repository a lot during startup, and this slows you down, then what will make your program load faster is the introduction of a caching mechanism that reduces the number of hits to the repository. This caching mechanism will need to be added, so that will be more code.
Getting rid of unused libraries, configuring libraries to do less during startup, replacing libraries with just a couple of functions if that's all the functionality you use for them, is usually the lowest hanging fruit.