Originally shared by Jeroen Wiert Pluimers

Originally shared by Jeroen Wiert Pluimers

Finally managed to trim down a circular uses reference down so the unit that pulls most stuff in now compiles in ~10 seconds instead of a few minutes.

The Delphi IDE now also crashes less often.

Comments

  1. Dorin Duminica As long as I own the code no circular references are allowed. I cannot do anything about the Delphi built-in units and near to nothing regarding 3rd party libraries, but in my own code there are no circular references. Never! As a result I have a pretty stable and fast IDE. I am not going to give that up just for being lazy. Often I see problems creeping in when working at customers code disdaining this attitude.

    ReplyDelete
  2. Can you describe more in detail how you achieved that?

    ReplyDelete
  3. Roland Bengtsson I started with a fresh project without a search path, then included the unit that took longest to compile.
    After that I manually added all depending units one by one until I got a feel how the dependencies were (I tried Peganza, but it hangs or breaks on this code base).
    From there I refactored some generic code to a more central unit that has almost no dependencies.
    Rinse, repeat a few times and now it's sort of OK enough.

    ReplyDelete
  4. Jeroen Wiert Pluimers Haven't you tried the Cycles View in the Unit Dependency Analyzer included with ModelMaker Code Explorer?

    ReplyDelete
  5. Yup. Was way too big because the base projects are huge. This process allowed me to short-circuit things a lot: I didn't even have a completely building project to get a grasp on where to cut-short things.

    ReplyDelete
  6. Uwe Raabe another problem is that various projects have units with the same name but different content. These units are used by the more generic units shared by the projects.
    That was a design decision by a well known Delphi agency that has really caused truckloads of problems.
    Apparently they could not stand up against a management culture of "this 'works', continue with next feature" and took way too many 'smart' looking shortcuts.
    I cornered that culture enough to be able to leave this project behind at the end of the month in a state where the software keeps working for far more than a the few days at a time on my arrival.

    ReplyDelete

Post a Comment