Skip to content
carlosame edited this page Jan 14, 2025 · 1 revision

To have an estimation of the size of this project in terms of lines of code (LoC), on the date of the last edition of this page Tokei 12.1.2 was run against the master branch.

Full project

To give figures for the whole EchoSVG project, including tests, tokei was run with the following arguments:

# Exclude bin and testbin, in case the Eclipse IDE was used
#
tokei -e bin -e testbin -e build echosvg

Which gives the following numbers:

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Autoconf                6          896          788           64           44
 Batch                   1           94           73            0           21
 CSS                    24          763          338          333           92
 Groovy                  1           54           30           18            6
 Java                 1701       350781       183590       124290        42901
 JavaScript             16         1949         1279          396          274
 JSON                    1           25           25            0            0
 Shell                   2          270          119          125           26
 SVG                   833       124879        96411        16822        11646
 Plain Text             21         1989            0         1687          302
 XSL                     3          374          199          124           51
 XML                    23         1903         1079          683          141
-------------------------------------------------------------------------------
 HTML                   27          433          365           49           19
 |- CSS                  2          125          110            4           11
 (Total)                            558          475           53           30
-------------------------------------------------------------------------------
 Markdown                7          861            0          618          243
 |- Groovy               1           23           17            5            1
 |- Java                 1            1            0            1            0
 |- Shell                2           40           40            0            0
 (Total)                            925           57          624          244
===============================================================================
 Total                2666       485271       284296       145209        55766
===============================================================================

Main sources

Then, to count only the main sources (no tests):

# Exclude bin and testbin, in case the Eclipse IDE was used
#
tokei -e bin -e testbin echosvg/*/src/main echosvg/buildSrc echosvg/config

which produces

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 CSS                     1            6            1            4            1
 Groovy                  2          108           60           36           12
 HTML                   25          320          302            0           18
 Java                 1464       315285       162945       115154        37186
 JSON                    1           25           25            0            0
 SVG                     1           54           35           16            3
 Plain Text              4          298            0          287           11
 XML                     2          260          164           45           51
===============================================================================
 Total                1500       316356       163532       115542        37282
===============================================================================

Apache Batik comparison

Despite EchoSVG supporting far more features than Apache Batik, the code bases have a similar size. However, note that Batik includes its own CSS parser while EchoSVG relies on the css4j library main module for CSS parsing, calc() and other CSS-related functionalities. Excluding tests, that css4j module is about 77K LoC (to reproduce this figure, clone the css4j repository and run tokei css4j/src/main css4j/buildSrc).

So for the full Apache Batik we have:

$ tokei -e lib xmlgraphics-batik
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Autoconf                6          896          788           64           44
 Batch                   4          179           52           89           38
 CSS                    21          744          322          330           92
 Java                 1662       361478       193206       127888        40384
 JavaScript             15         1927         1276          378          273
 Makefile                1            2            2            0            0
 Shell                   2          130           56           48           26
 SVG                   568        92457        66120        15444        10893
 Plain Text              5          578            0          538           40
 XSL                     8         1198          810          220          168
 XML                   109        24515        19628         3357         1530
-------------------------------------------------------------------------------
 HTML                   30          598          536           36           26
 |- CSS                  1           19           19            0            0
 (Total)                            617          555           36           26
===============================================================================
 Total                2431       484702       282796       148392        53514
===============================================================================

And Batik's main sources (no tests):

$ tokei -e lib xmlgraphics-batik/*/src/main xmlgraphics-batik/pom.xml
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 CSS                     1            6            1            4            1
 HTML                   28          355          334            0           21
 Java                 1508       341214       181493       121896        37825
 SVG                     3          867          747           84           36
 Plain Text              5          578            0          538           40
 XML                     1          216          203            0           13
===============================================================================
 Total                1546       343236       182778       122522        37936
===============================================================================
Clone this wiki locally