r/programming • • Jan 05 '11

Drupal 7 released.

http://drupal.org/drupal-7.0
222 Upvotes

259 comments sorted by

View all comments

Show parent comments

21

u/skeww Jan 05 '11 edited Jan 05 '11

Wordpress isn't a lightweight compared to Drupal.

X:\wordpress-3.0.4>cloc *
     565 text files.
     563 unique files.
       7 files ignored.

http://cloc.sourceforge.net v 1.53  T=9.0 s (61.8 files/s, 23006.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                            291          20399          41225          97013
Javascript                     159           4159           2619          22097
CSS                             88           2381            479          14448
HTML                            17            258              7           1927
XML                              1              7              0             37
-------------------------------------------------------------------------------
SUM:                           556          27204          44330         135522
-------------------------------------------------------------------------------


X:\drupal-7.0>cloc --force-lang="PHP",module --force-lang="PHP",install --force-lang="PHP",inc --force-lang="PHP",engine *
     852 text files.
     847 unique files.
     221 files ignored.

http://cloc.sourceforge.net v 1.53  T=10.0 s (62.9 files/s, 22984.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                            404          14828          66433         127260
CSS                            116            810           1098           8909
Javascript                      84            815           2808           5085
Bourne Shell                     8            172              3           1060
XML                             12              3              0            441
HTML                             3              4              0             69
ASP.Net                          1              3              0             40
SQL                              1              0              0              1
-------------------------------------------------------------------------------
SUM:                           629          16635          70342         142865
-------------------------------------------------------------------------------

As you can see, Wordpress isn't significantly smaller. Wordpress is merely ~24% less code (with ~38% less comments).

Edit: I didn't include the "test" files, since these are unit tests and the code is never executed on a regular website.

10

u/bananahead Jan 05 '11

I agree with you that wordpress isn't as lightweight as it seems, but SLOC is not a real great metric of anything.

4

u/skeww Jan 05 '11

Feel free to provide a better metric.

It was meant as a ballpark figure. Many people seem to assume that Wordpress is something very light and compact, which it certainly isn't.

There are almost 100 files with almost 100k lines of code. It's quite a bit of stuff.

1

u/[deleted] Jan 06 '11

better metric? How about the fact that all drupal and joomla sites on shared hosting running slow as fuck, even if they are optimized to hell and back. Wordpress has no such issue whatsoever.

I dumped all joomla shit I had long ago. Not only is it bloated and slow as fuck, it is impossible to plug every god damn security hole in it, and it's only a matter of time before your site is hacked.

6

u/TylerEaves Jan 06 '11

Guess what...how useable it is on your shitty ass $5/month shared hosting is pretty much irrelevant to people doing real sites.

→ More replies (2)

0

u/[deleted] Jan 06 '11

[deleted]

3

u/[deleted] Jan 06 '11

not a knock on that link, but I don't really trust many webhosts that are well known or established, a ton of fly by night with a couple of guys running a few servers in their moms basement, just asking for headaches, especially when your customers keep calling asking why their website is always offline

1

u/skeww Jan 06 '11

Drupal runs fine on cheap shared hosting. Well, the 5€/m kind with at most 50 users per server.

There isn't much to do for the server if the vast majority of your users are anonymous and if caching is enabled.

If you want similar performance with Wordpress, you have to install a plugin.