(better?) dependency checking
Brought to you by:
sauerf
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?
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.
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?
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.