Why does line count change so much from D2007 to D2010?
Asked Answered
T

4

10

Our app at work is a huge project with over 3000 units, weighing in about 3.5 million lines of code.

...or at least it was when we were compiling it under D2007. We recently updated to D2010, and now if we run a full build, the line count finally stops at about 4.9 million. Same DPR, same code base, same everything, but the compiler's somehow running over about 40% more lines of code in the build cycle and nobody here knows why.

Just to make things more confusing, after building, we can go to Project -> Information in the IDE and it reports 3.8M lines. In D2007, the compiler dialog and the Project -> Information dialog reported the same number.

Anyone have any idea what's going on here?

Tol answered 2/2, 2010 at 23:10 Comment(6)
Are you sure that the compiler paths are the same? Is it possible that code that wasn't being compiled before now is being compiled?Wadewadell
@Nick, no the numbers are from the SAME compile. One immediately before pressing OK after a successful compile, and the second by then immediately checking the Project -> Information option. Under 2007 the numbers matched, now under 2010 they do not. Which is more accurate?Stubborn
@skamradt: I think Nick's referring to the difference between the D2007 and D2010 line counts.Tol
@Mason: I'm not sure how that is important. If D2010 is reporting different numbers for the same compile it is clearly getting it's twisters in a knick somewhere, regardless of whatever the explanation for the difference between D2010 and D2007,Mcbrayer
to add to Nick's comment, I would start procmon, limit the filter to Delphi32 & Files, do a build in both environments and diff the output to check wether exact the same files are used in a build.Pricking
Mason, I have seen an increase from Delphi 2009 to Delphi 2010 as well.Cesium
H
1

Doesn't D2010 support generics? I think some of the libs have been replaced by generics, which could account for additional lines that appear to be parsed if it counts the "virtual" lines it's using.

Humes answered 3/2, 2010 at 9:48 Comment(1)
Generics indeed creates additional lines of code behind the curtains.Fossette
V
1

It looks like it is a bug. The correct line number is still reported under Project | Information. See Nick's answer to a similar question.

Vorticella answered 5/2, 2010 at 6:27 Comment(0)
M
0

I wonder if the handling of linefeeds/carriage returns to determine line count in the compiler progress area is getting befuddled somehow as a result of the Unicode internals.

Have you tried compiling in D2009 and seeing if that exhibits the same strange behaviour?

Mcbrayer answered 3/2, 2010 at 1:50 Comment(0)
H
0

Could it be because it is more aggressive with inlining?

Hiltan answered 3/2, 2010 at 3:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.