dotProject Recipe: speeding up DotProject
I run a dotproject site on a hosted server. Once more than a few people began using the site at once, we found that peformance was dropping enough to warrant looking into optimization possibilities. So far, it seems that there are two main steps to take: turn on caching, and add indexes to several tables in the database.
1. Turn on caching in gacl.class.php
In the file gacl.class.php, change the following settings to TRUE and FALSE as shown:
/** @var boolean Caches queries if true */ var $_caching = TRUE; /** @var boolean Force cache to expire */ var $_force_cache_expire = FALSE;
2. Add indexes to tables
ALTER TABLE history ADD UNIQUE `history_id` (`history_id`), ADD INDEX `history_date` (`history_item`, `history_table`, `history_date`); ALTER TABLE projects ADD INDEX `project_id` (`project_id`, `project_company`, `project_name`), ADD INDEX `project_percent_complete` (`project_id`, `project_name`, `project_color_identifier`), ADD INDEX `project_id_company` (`project_company`, `project_id`), ADD INDEX `project_id_task_search` (`project_id`, `project_company`, `project_name`, `project_color_identifier`); ALTER TABLE `user_tasks` ADD INDEX `user_id` (`user_id`, `perc_assignment`), ADD INDEX `perc_assignment` (`perc_assignment`), ADD INDEX `task_id` (`task_id`); ALTER TABLE users ADD INDEX `user_id` (`user_id`, `user_contact`, `user_username`); __________________
After making these changes, the speed was tremendously improved.