Sunday, July 19, 2015

IDEs, large code bases and speed

People often fear IDEs because they are heavy and bloated and slow. Turns out that if you at least give some of the good ones a try those reasons suddenly don't don't make any sense.

For example, I've been working for the past two years with Go and the Go Plugin for IntelliJ Platform and I keep hearing other Go developers that they don't want IDEs to be slow and bloated... So today I decided to have a look in my GOPATH and see what's the status there.
 
cloc $GOPATH/src

   82632 text files.
   60097 unique files.                                          
   64918 files ignored.

http://cloc.sourceforge.net v 1.60  T=147.84 s (139.7 files/s, 104402.4 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                             8059         284504         421962        1676304
Javascript                     9136         255587         402064        1647059
HTML                            863          13471            639         193480
XML                             244           3343           1658         106258
C++                              95          15362           2627          80513
CSS                             504           7217           2036          71332
YAML                            206            412            458          66475
SASS                            434       10003298           2829          43960
C/C++ Header                    148           3805           3771          29219
ActionScript                    112           1231           2593          16451
LESS                            168           1098            425           9209
Java                             15            642           1809           6947
Bourne Shell                    141           1237           1267           5707
Objective C                      46           1571           1261           5596
Python                           23            957           1029           4785
Assembly                         49            351            342           4665
C                                19            558            217           3178
Bourne Again Shell               65            515            401           2791
QML                              33            330            757           2269
CoffeeScript                     71            350            284           2024
Perl                             14            283            382           1823
make                             84            563            752           1618
Ruby                             53            312            293           1547
C#                               19            255            285           1372
DTD                               2            192            182            551
Lisp                              4             45             86            252
SQL                               5             64            103            237
Maven                             2             11              0            203
CMake                             3             29             31            150
MSBuild scripts                   2              0             14            132
JavaServer Faces                  3              3              0            109
vim script                        4             24             45             93
D                                 9              0              0             87
Smarty                            6             17             30             86
m4                                1             17              0             76
DOS Batch                         2             27             16             68
XSLT                              1              5              0             32
IDL                               1              8              0             25
ASP.Net                           2              5              0             23
--------------------------------------------------------------------------------
SUM:                          20648       10597699         850648        3986706
--------------------------------------------------------------------------------

And you know what? Turns out that the plugin handles this just fine. It takes about 30 seconds to do the initial indexing, which is one time only and then that's it (it took cloc almost five times more just to count the lines).

Auto-completion works like it would have only two-three files to get the data from, which is astonishing fast when you consider the numbers.

So yeah, definitely a nice one so far.

My system:
- CPU Intel Core i7 4720HQ
- RAM 16GB
- SSD Samsung 850 Evo 120GB
- OS Kubuntu 15.04
- Java 1.8.0_45
- IntelliJ IDEA Ultimate 15 EAP
- Go plugin compiled from master (you can use nightly or alpha just fine)

Oh and get this, it helps you save key presses, cool no?

No comments :