Create a single require file to speed up rails boot

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

This issue is to track idea #213992 (comment 360795740) to make the conversation easier.

Issue #213992 (closed) aims to reduce rails boot time. There are several different improvements have been made.

One idea is to concatenate all(or almost all) require files into a single file. From strace profile, there are ~20% time in system calls(open/close/stat/openat) #213992 (comment 355428264). Reduce require would reduce this time.

To achieve this goal, we can take two steps:

  • create a single require file to boot rails without bootsnap. Bootsnap override requires and autoload, it makes it tricky to concatenate bootsnap files into the single file.
  • create a single require file to boot rails with bootsnap
Edited by 🤖 GitLab Bot 🤖