You learn interesting things when testing super-fast #hanami apps.

For example: that Faker is very slow to load and you should probably avoid it.

Or that database cleaning in really slow, so you should only clean when you really use the database.

#ruby

@katafrakt woah, I’d have never considered this!
@timriley @katafrakt this makes sense, faker comes with a loooot of files and we know that require is dead slow. Would be nice to do something about it.
@solnic @timriley @katafrakt dont bootsnap make require a lot faster?
@stoivo @timriley @katafrakt yes but it doesn't change the fact that gems could either use zeitwerk or at least be cherry-pickable so that you don't have to load tons of files when you only need a small portion of an entire library. Also, bootsnap may cause issues sometimes, or at least that was my experience last time I used it.
@solnic @timriley @katafrakt right, you could save some time by only loading what you need with zeitwerk or alike
@solnic @timriley @katafrakt I did a some testing yesterday. I suspect the lowest part is reading and merging yaml files https://github.com/faker-ruby/faker/issues/2719
Speedup require and first call · Issue #2719 · faker-ruby/faker

Hi, I use faker and I noticed that some parts are slower then what I would have liked. I wonder if you have had some ideas for what you would like to do to make it faster to load and use. I did a b...

GitHub
@stoivo @timriley @katafrakt does it load yamls on demand?
@solnic @timriley @katafrakt No, it loads all yaml files when you need the first translation. Most fakers use a translation as a set it samepls from. Faker::Crypto::Sha1 is one of the few which don't
@stoivo @timriley @katafrakt so seems like there’s a lot of potential to improve its load time!