Ticket #117 (closed defect: invalid)
Faster Page-index
| Reported by: | OnegWR (copied by NilsLindenberg) | Owned by: | unassigned |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | actions | Version: | 1.1.6.1 |
| Severity: | normal | Keywords: | pageindex |
| Cc: |
Description
By default PageIndex uses $this->""LoadAllPages""() which reads your **whole site** into one array.
If you would use a new function like $this->""LoadAllPagesInfo""() you will get the same info but without the 'body' content. This should speed up PageIndex a bit on larger sites...
1) Find in ##wikka.php## (Around 33%)
function LoadAllPages() { return $this->LoadAll("select * from ".$this->config["table_prefix"]."pages where latest = 'Y' order by tag"); }
And replace it with:
function LoadAllPages() { return $this->LoadAll("select * from ".$this->config["table_prefix"]."pages where latest = 'Y' order by tag"); }
function LoadAllPagesInfo() { return $this->LoadAll("select id,tag,time,owner,user,latest,note from ".$this->config["table_prefix"]."pages where latest = 'Y' order by tag"); }
1) Find in ##actions/pageindex.php## (top)
if ($pages = $this->LoadAllPages())
And replace it with:
if ($pages = $this->LoadAllPagesInfo())
1) Same trick as in (2) can be done in ##actions/mypages.php##...
-- OnegWR
See the first item on http://wikka.jnsx.com/WikkaOptimization, too --NilsLindenberg