[ENH] Optimize profile tester job by replacing full DB re-bootstrap with dump/restore approach
Problem:
- Each of the profiles triggers a full database re-bootstrap individually.
- Causes pipeline delays, wasted resources, and lower developer productivity.
Technical Investigation:
- Profiled
ProfileCheckCommand.phpandapplyProfiles()method. - Identified bottleneck in repetitive database re-bootstrap calls.
- Compared performance between
--allflag vs individual profiles.
Implemented Solution:
- Added
createCleanDatabaseDump()to generate a clean DB dump after initial Tiki install. - Added
restoreDatabaseFromDump()to restore the DB between profiles. - Replaced slow re-bootstrap calls in
applyProfiles()with fast dump/restore. - Added fallback to original re-bootstrap method if dump/restore fails.
Performance & Monitoring:
- Added logging for dump creation and restore times.
- Added timing measurements to track overall performance improvement.
- Target: Reduce total run time from >1 hour to ~30 minutes.
- Verified all profiles still test correctly and remain isolated.
Edited by Sandeep D