I have a couple of questions I'm hoping the community can help me with.  Our pmwiki site has pages that sometimes take between 2 - 8 seconds to load.  I've used stopwatch, and then done some research, which led me to enable the following in my local config:<br>
<br># pagelist caching<br>$WorkDir = '/home/website_Download/work.d';<br>$EnableHTMLCache = 1;<br>$PageCacheDir = $WorkDir;<br>$PageListCacheDir = $WorkDir;<br><br># search and pagelist exclusions<br>$SearchPatterns['default'][] = '!\.GroupHeader$!';<br>
$SearchPatterns['default'][] = '!\.GroupFooter$!';<br>$SearchPatterns['default'][] = '!Profiles\..*-Contrib$!';<br>$SearchPatterns['default'][] = '!Profiles\..*-LastAction$!';<br>
<br>$group = FmtPageName('$Group',$pagename);<br>if ($group != 'Development') {<br>    $SearchPatterns['default'][] = '!^Site\.!';<br>    $SearchPatterns['all'][]     = '!^Site\.!';<br>
    $SearchPatterns['normal'][]  = '!^Site\.!';<br>}<br><br># Page indexing<br>$EnablePageIndex = 1;<br><br><br>With these on, I can confirm that pagelist caching does appear to be working, as I see the save and load in the stopwatch output.  however, on pages with multiple pagelists, I get multiple PageStore::ls calls for each item in every pagelist, which takes a ton of time.  Also, I see the httpd processor usage go all the way to 100% during a GET on these pages.  I've attached my stopwatch output below, and also an example of one of the pagelist templates i am using.  Questions:<br>
<br>1. With pagelist caching enabled, why is there an PageStore::ls for every single result?  Should that be in the cache?<br>2. Is the spike in CPU usage for each pageview normal?  Could something like PHP accelerator help?<br>
3. I have EnableHtmlCache on, but it doesn't appear to do anything.  Is this because the pages require login?<br>4. Is there anything I can do to get rid of all those PageStore::ls calls?<br>5. Is there anything I'm doing in my template that is ineffecient?<br>
<br>Thanks in advance for any help or answers you can provide.  Also, any personal experience or advice trying to speed up these page views is appreciated.  Stopwatch output and template below.<br><br>0: 00.00 MarkupToHTML begin<br>
1: 00.05 FPLTemplate: Chain begin<br>2: 00.05 FPLTemplate: FPLTemplateLoad<br>3: 00.05 FPLTemplate: FPLTemplateDefaults<br>4: 00.05 FPLTemplate: FPLTemplatePageList<br>5: 00.05 MakePageList pre<br>6: 00.05 PageListCache begin load key=1783098ec26df5f43fd5bcac95c061aa<br>
7: 00.05 PageListCache end load<br>8: 00.05 PageListSources begin<br>9: 00.05 PageListSources end count=10<br>10: 00.05 PageListSort pre ret=6 order=-MemoryBandwidth<br>11: 00.05 MakePageList items count=10, filters=PageListSort<br>
12: 00.06 MakePageList post count=10, readc=10<br>13: 00.06 PageListSort begin<br>14: 00.06 PageListSort sort<br>15: 00.08 PageListSort end<br>16: 00.08 MakePageList end<br>17: 00.08 FPLTemplate: FPLTemplateSliceList<br>18: 00.08 FPLTemplate: FPLTemplateFormat<br>
19: 00.10 MarkupToHTML begin<br>20: 00.15 PageStore::ls begin wiki.d/{$FullName}<br>21: 00.18 PageStore::ls merge wiki.d/{$FullName}<br>22: 00.18 PageStore::ls end wiki.d/{$FullName}<br>23: 00.18 PageStore::ls begin $FarmD/wikilib.d/{$FullName}<br>
24: 00.18 PageStore::ls merge $FarmD/wikilib.d/{$FullName}<br>25: 00.18 PageStore::ls end $FarmD/wikilib.d/{$FullName}<br>26: 00.18 PageStore::ls begin wiki.d/{$FullName}<br>27: 00.20 PageStore::ls merge wiki.d/{$FullName}<br>
28: 00.20 PageStore::ls end wiki.d/{$FullName}<br>29: 00.20 PageStore::ls begin $FarmD/wikilib.d/{$FullName}<br>30: 00.20 PageStore::ls merge $FarmD/wikilib.d/{$FullName}<br>31: 00.20 PageStore::ls end $FarmD/wikilib.d/{$FullName}<br>
<... repeats a ton of times. Edited for brevity ... ><br><br>509: 03.82 MarkupToHTML end<br>510: 03.82 FPLTemplate: Chain end<br>511: 03.82 MarkupToHTML end<br>512: 03.83 MarkupToHTML begin<br>513: 03.96 MarkupToHTML end<br>
514: 03.96 MarkupToHTML begin<br>515: 03.99 MarkupToHTML end<br>516: 05.11 now<br><br><br><br>[[#blpflistFG]]<br>(:if equal {<$Group}:)<br>(:table width="100%" cellspacing=0 style="border:1px solid black; background-color:#dde;":)<br>
(:cellnr style="padding: 3px 5px; border-bottom:1px solid black; font-size: small;" :)'''Host'''<br>(:cell style="padding: 3px 5px;" :)'''OS'''<br>(:cell style="padding: 3px 5px;" :)'''kernel'''<br>
(:cell style="padding: 3px 5px;" :)'''bit'''<br>(:cell style="padding: 3px 5px;" :)'''cpus'''<br>(:cell style="padding: 3px 5px;" :)'''GHz'''<br>
(:cell style="padding: 3px 5px;" :)'''CPU model'''<br>(:cell style="padding: 3px 5px;" :)'''RAM'''<br>(:cell style="padding: 3px 5px;" :)'''Video Card'''<br>
(:cell style="padding: 3px 5px;" :)'''Video RAM'''<br>(:cell style="padding: 3px 5px;" :)'''Driver'''<br>(:cell style="padding: 3px 5px;" :)'''BLPF'''<br>
(:ifend:)<br>(:if [ exists {=$FullName} && auth read {=$FullName} ]:)<br>(:cellnr style="padding: 0px 6px; font-size: x-small;" :)[[{=$FullName}|{{=$FullName}$:hostname}]]<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:os}<br>
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:kernel}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:bits}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:processors}<br>
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:cpu_speed}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:cpu_model}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:RAM}<br>
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:video_card}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:video_card_mem}<br>(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:video_card_driver}<br>
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:blpf}<br>(:ifend:)<br>(:if equal {>$Group}:)<br>(:cellnr colspan=12 text-align=right style="padding: 8px 12px 0 0;":)Last Updated {=$LastModified}<br>
(:tableend:)<br>(:ifend:)<br>[[#blpflistFGend]]