setting to turn off expensive queries
This commit is contained in:
parent
b44bb472eb
commit
ddf166e144
|
@ -852,3 +852,10 @@ path: Path to the plugin files. defaults to site/path + '/plugins/'. Expects tha
|
|||
each plugin will have a subdirectory at plugins/NameOfPlugin. Change this
|
||||
if you're using a CDN.
|
||||
sslpath: Path to use on the SSL server. Same as plugins/path.
|
||||
|
||||
performance
|
||||
-----------
|
||||
|
||||
high: if you need high performance, or if you're seeing bad
|
||||
performance, set this to true. It will turn off some high-intensity code from
|
||||
the site.
|
||||
|
|
|
@ -211,12 +211,13 @@ class AllAction extends ProfileAction
|
|||
$ibs->show();
|
||||
}
|
||||
// XXX: make this a little more convenient
|
||||
if (common_config('site', 'private')) {
|
||||
|
||||
if (!common_config('performance', 'high')) {
|
||||
$pop = new PopularNoticeSection($this);
|
||||
$pop->show();
|
||||
$pop = new InboxTagCloudSection($this, $this->user);
|
||||
$pop->show();
|
||||
}
|
||||
// $pop = new InboxTagCloudSection($this, $this->user);
|
||||
// $pop->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,9 @@ class AttachmentAction extends Action
|
|||
function showSections() {
|
||||
$ns = new AttachmentNoticeSection($this);
|
||||
$ns->show();
|
||||
$atcs = new AttachmentTagCloudSection($this);
|
||||
$atcs->show();
|
||||
if (!common_config('performance', 'high')) {
|
||||
$atcs = new AttachmentTagCloudSection($this);
|
||||
$atcs->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ class PublicAction extends Action
|
|||
|
||||
$pop = new PopularNoticeSection($this);
|
||||
$pop->show();
|
||||
if (common_config('site', 'private')) {
|
||||
if (common_config('performance', 'high')) {
|
||||
$cloud = new PublicTagCloudSection($this);
|
||||
$cloud->show();
|
||||
}
|
||||
|
|
|
@ -285,8 +285,10 @@ class ShowstreamAction extends ProfileAction
|
|||
function showSections()
|
||||
{
|
||||
parent::showSections();
|
||||
$cloud = new PersonalTagCloudSection($this, $this->user);
|
||||
$cloud->show();
|
||||
if (!common_config('performance', 'high')) {
|
||||
$cloud = new PersonalTagCloudSection($this, $this->user);
|
||||
$cloud->show();
|
||||
}
|
||||
}
|
||||
|
||||
function noticeFormOptions()
|
||||
|
|
|
@ -274,10 +274,12 @@ class Router
|
|||
array('action' => 'userbyid'),
|
||||
array('id' => '[0-9]+'));
|
||||
|
||||
$m->connect('tags/', array('action' => 'publictagcloud'));
|
||||
$m->connect('tag/', array('action' => 'publictagcloud'));
|
||||
$m->connect('tags', array('action' => 'publictagcloud'));
|
||||
$m->connect('tag', array('action' => 'publictagcloud'));
|
||||
if (!common_config('performance', 'high')) {
|
||||
$m->connect('tags/', array('action' => 'publictagcloud'));
|
||||
$m->connect('tag/', array('action' => 'publictagcloud'));
|
||||
$m->connect('tags', array('action' => 'publictagcloud'));
|
||||
$m->connect('tag', array('action' => 'publictagcloud'));
|
||||
}
|
||||
$m->connect('tag/:tag/rss',
|
||||
array('action' => 'tagrss'),
|
||||
array('tag' => self::REGEX_TAG));
|
||||
|
@ -898,7 +900,9 @@ class Router
|
|||
|
||||
// people tags
|
||||
|
||||
$m->connect('peopletags', array('action' => 'publicpeopletagcloud'));
|
||||
if (!common_config('performance', 'high')) {
|
||||
$m->connect('peopletags', array('action' => 'publicpeopletagcloud'));
|
||||
}
|
||||
|
||||
$m->connect('peopletag/:tag', array('action' => 'peopletag',
|
||||
'tag' => self::REGEX_TAG));
|
||||
|
|
Loading…
Reference in New Issue
Block a user