Commit 4eac1824dec951256bb4b8041a70a1ba4f5f0752
1 parent
f419d57d
KTS-3687
"Indexer dashlet may take considerable time to show stats on a large repository" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Waston git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9271 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
4 deletions
search2/indexing/indexerCore.inc.php
| ... | ... | @@ -951,11 +951,11 @@ abstract class Indexer |
| 951 | 951 | $docsInIndex = $index->getDocumentsInIndex(); |
| 952 | 952 | |
| 953 | 953 | // we are only interested in documents that are active |
| 954 | - $docsInQueue = $index->getIndexingQueue(false); | |
| 955 | - $docsInQueue = count($docsInQueue); | |
| 954 | + $sql = "SELECT count(*) as docsInQueue FROM index_files"; | |
| 955 | + $docsInQueue = DBUtil::getOneResultKey($sql, 'docsInQueue'); | |
| 956 | 956 | |
| 957 | - $errorsInQueue = $index->getIndexingQueue(true); | |
| 958 | - $errorsInQueue = count($errorsInQueue); | |
| 957 | + $sql = "SELECT count(*) as errorsInQueue FROM index_files where status_msg is not null or status_msg <> ''"; | |
| 958 | + $errorsInQueue = DBUtil::getOneResultKey($sql, 'errorsInQueue'); | |
| 959 | 959 | |
| 960 | 960 | $sql = "SELECT count(*) as docsInRepository FROM documents"; |
| 961 | 961 | $docsInRepository = DBUtil::getOneResultKey($sql, 'docsInRepository'); | ... | ... |