Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 (better?) dependency checking

open
Frank Sauer
None
5
2003-07-19
2003-07-17
Ilja Preuß
No

It seems as if every time I save a java file, the *whole
project* gets measured again. That makes the plugin
virtually unusable on not-so-fast machines / bigger
projects.

Would it be possible to only recalculate those metrics
which could have changed by changing the class?

Discussion

  • Frank Sauer
    Frank Sauer
    2003-07-18

    Logged In: YES
    user_id=52904

    This is exactly what it is doing already. During an auto build,
    only the metrics that have to be recalculated are recalculated.
    This is the changed file, and its parents to the root project.
    The higher levels are simply re-aggregating the values of
    existing children. This is fast. The only true recalculations
    occur at the changed file. The only optimization I can think of
    is doing the dependency search itself at the file level and
    doing some kind of smart merge at the package level, perhaps
    I'll do that some time.

     
  • Ilja Preuß
    Ilja Preuß
    2003-07-19

    Logged In: YES
    user_id=52599

    So do I understand correctly: Even so I get "items
    remaining: xxx" with xxx always the same everytime I do a
    save, most items should take virtually no time?

     
  • Frank Sauer
    Frank Sauer
    2003-07-19

    Logged In: YES
    user_id=52904

    Correct, the calculations occur bottom-up, and only
    the lowest level will have to recalculate all metrics.
    However, you brought up a good point, because the
    package dependencies are calculated at the package level
    and are therefore recalculated every time a single class inside
    a package is changed. I think it is possible to move that
    calculation (search) down a level to the class level, and
    simply merge at the package level to speed up the auto build.
    This would slow down the full build since now a large number
    of searches is done, instead of just one.
    Will investigate and implement if found to be beneficial.

     
  • Frank Sauer
    Frank Sauer
    2003-07-19

    • assigned_to: nobody --> sauerf