Hi, Philip & Cedric,
I revamped DailyProjectUnitTest. Now it takes only 6 seconds to compute
both summary and
detail to day 4/5/2006 on my desktop, it was 124 seconds yesterday. The
overly use of FilePattern
match is the key to performance regression. It made daily project
analysis 20 times slower.
Cedric will have to revisit other DailyProjectData for performance.
Philip's idea to take out project workspaces' loop is hard to implement,
although it is doable. Here
is the reason that it is more complicated than we think. Suppose we have
file,
C:\svn\hackystat\hackyCore_Kernel\src\org\hackystat\kernel\util\DataInfo.java
Workspace root is C:\svn\hackystat, then the trimmed path will be
hackyCore_Kernel\src\org\hackystat\kernel\util\DataInfo.java
We can get top-level workspace hackyCore_Kernel\. Although it looks the
same as project
Hackystat-7's workspace hackyCore_Kernel\, they are two different
instances. With current
implementation, we still have to loop through this project's all
workspaces to compare. In order
to achieve O(1) time complexity, we may have to introduce the hashcode
on case-insensitive
trimmed path. I will get back to this when I have time.
Cheers,
Hongbing