by dismantlethesun · 9y ago · 0 comments
A Python project I work on has 279,124 lines of code and boots up in 2.5 seconds.
Without downloading it, all I can find is Discourse had 60,000 lines of code 3 years ago [1]. Assuming as an extreme estimate they tripled their code size in 3 years, we have 180,000 LOC taking 6 seconds to boot up according to the article.
Is this normal for Ruby? Is the author using a spinning disk drive rather than an SSD?
you can watch it here: https://www.youtube.com/watch?v=_bDRR_zfmSk
I'm not sure about those stats you posted from 3 years ago since they aren't using the same `rake stats` numbers that are built in to Rails. Discourse's Rails app is currently 63k SLOC not including tests.
On my relatively fast computer booting takes 4s without bootsnap and 2.5s with it, which is a nice quality of life improvement.
I think it's safe to assume the author using reasonable SSDs on a Macbook Pro, given that the iseq cache targets only macOS.
I'm not 100 percent sure if third party modules for background tasks get loaded and the same time but they aren't part of my line of code count.
* MacOS Sierra
* 2.6 GHz Intel Core i7
* 16GB 2133 MHz LPDDR3
* 500GB SSD, whatever Apple ships.