The reason of compilation time grow

I've created one patch, after that compilation time get ~x4 time more.

Even commit history available, here is the changes to simply describe what changed:

  1. added about 10 small mod files (few same files in other location) - no new logic there, only wrap and move out existing features from the main controllers
  2. first time, I have connected crate:: level in use - who knows, maybe compiler starting from root for every file containing it.. or make some reverse in borrow check
  3. fixed warnings of cargo clippy - lol, those wrappers in #1 I have created just to reduce arguments quantity. Also, by this point I have replaced match with map in few places, removed extra references, nothing that could increase the time.

I really don't know why build time take longer... even not critical, even I'm waiting more on every code change, thoughts maybe I did something wrong in code, maybe added some extra references, but mostly it's only those mod files in #1

Maybe some tools available to debug compilation process?
Thanks for any ideas

You mean the changes in this commit? I don't see anything that would be obviously likely to increase compilation time significantly.

You said x4 but what is the absolute time? How many seconds did compilation take before and afterward? What hardware are you using to run the compiler (CPU, RAM size, etc)?

1 Like

Maybe this commit, I made few before started to feel delays in compilation. The timing is estimated, but larger than before and larger much, makes some discomfort because I'm waiting a while on every change build..

Hm, maybe that's something with my system just, it's Fedora 41 with last update yesterday
because I don't see any rational reason too by the changes in commits.

Let me test it for few days, if there is no problems with crate:: namespace connection. Mystery.

According to another my question, thoughts, the reason could be in references count by &getters quantity grow in my app, because I didn't knew that referencing is expensive operation for borrow checker. Maybe the answer in that.