Details
-
Improvement
-
Resolution: Fixed
-
Major
-
0.27
-
None
Description
The current AuditTrailServiceDAO#getAuditTrails method retrieves a list of audit trails from the database and for each audit trail makes 3 db calls to retrieve ContributorId, FileId and ActorName.
This should be refactor to a single query joining the 3 extra parameter into the initial query directly in the DB. This would collapse the number of queries performed from 1+n*3 to 1, where n is the number of audit trails in the result.
This method is used in both the AuditTrailPreserver and the rest interface. For large bitrepositories, as f.ex. the one on regulus this can make for very slow getAuditTrails calls. It is questionable whether the initial audit trail preservation would finish in reasonable time: 1 second pr. audit trail * 1.000.000 audits = 2 weeks.