GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit ddf166e1 authored by Evan Prodromou's avatar Evan Prodromou

setting to turn off expensive queries

parent b44bb472
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment