For whatever reason, let’s look at “Total Physical Source Lines of Code” from a recent mysql-6.0 tree (and PBXT from PBXT source repo):
See the spreadsheet here.
Raw data:
Blackhole       336
CSVÂ Â Â Â Â Â Â Â Â Â Â Â 1143
Archive        2960
MyISAMÂ Â Â Â Â Â Â Â 34019
PBXTÂ Â Â Â Â Â Â Â Â Â 41732
Maria         69019
InnoDBÂ Â Â Â Â Â Â Â 82557
Falcon        91158
NDBÂ Â Â Â Â Â Â Â Â Â 365272
NDB has a 100,000 line test suite.
PBXT supports MySQL and Drizzle.
Conclusions to draw? Err… none really.
That means that our test suite is bigger than
any other of the compared engines. Cool!
Also noticeable, we have during the last ~5 years
added features to the ndb kernel, but still decreased/kept SLOC (in the kernel).
I’m no expert, but I think this fits the criteria for the today very fashionable word “reengineering”.
A couple of conclusions
1) MyISAM uses a very compact coding style packing much functionality per line (as does MySQL Server)
2) NDB has a coding style that is much less compact, also the NDB message passing architecture requires many code lines to send and receive messages (which by the way are executed very fast by modern CPU’s)
3) NDB solves a bigger problem so natural that it uses more code lines, also distributed database.
Conclusions from this, you can program in many different styles to achieve the same purpose.
Personally I like counting code lines, but mainly as a way of motivating myself that I’m actually moving forward :)
Pingback: NDB Kernel size over releases | Ramblings
On that note – I would be interested in seeing SLOC for each MySQL version compared to engine code. I think in some marketing usage the complexities of an engine are under appreciated, since “anyone can write one”.