Loading

Speed up loading

General Discussion around Collabtive

Speed up loading

Postby onda » 21.11.2014, 14:37

With the amount of open projects + messages logging in is taking for ever to load the landing page, anyone else experiencing a similar issue? and managed to speed up the process?
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Speed up loading

Postby Eva » 21.11.2014, 21:41

How many projects and messages are there? And how long does it take to login?
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Speed up loading

Postby Remiguel » 21.11.2014, 23:49

Same here
I have 85 projects assigned and about 300 messages. With direct connection to the server Collabtive is opening almost instantly, but behind a proxy it is another story.
We could limit the amount of messages.
e.g. to show messages from the 60 last days.

form index.tpl (line 400)
Code: Select all
{section name=message loop=$messages}
{if time()-($messages[message].posted) < 5184000}


close the condition (line 540)

Code: Select all
{/if}
{/section}
Remiguel
 
Posts: 96
Joined: 10.06.2014, 09:34
Location: Spain / France

Re: Speed up loading

Postby onda » 22.11.2014, 11:04

I would say I´ve around 100 projects ongoing, and messages in excess of 300, tried limiting messages, however getting syntax error, I'll give it another go later. The issue is what is drawing on all the resources when going back and forth to the index page? maybe a simple solution would be some form of pagination?
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Speed up loading

Postby onda » 24.11.2014, 15:45

I've droped everything from index.tpl except projects, and there is no noiticable change to the loading, so it is loading the projects where the delay can be found, sherlock
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Speed up loading

Postby Eva » 25.11.2014, 22:06

I don't know how skilled you are, but if possible, could you try disabling TinyMCE (the rich text editor component) from project editing/adding forms?
I have a suspicion that this may change the loading time.
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Speed up loading

Postby onda » 26.11.2014, 13:46

Thanks, removed tinymce, still no effect, I get the feeling that it is trying update. however this wouldn't explain why it takes loger with more projects added, anymore thaoughts?
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Speed up loading

Postby Philipp » 28.11.2014, 22:02

Ok here is what is probably happening.
We have added a new protection against XSS attacks in Collabtive 2.0

Collabtive 2.0 filters every user input through HTMLPurifier.
This is pretty computationally intensive and has caused performance issues for other users.

To deactivate this:
Open initfunctions.php , find line 138-152:
Code: Select all
   $config = HTMLPurifier_Config::createDefault();
       if(file_exists(CL_ROOT . "/files/standard/ics"))
       {
          $config->set('Cache.SerializerPath', CL_ROOT . "/files/standard/ics");
       }
       else
       {
          $config->set('Cache.SerializerPath', NULL);
       }
      $purifier = new HTMLPurifier($config);
        if (!is_array($array[$name])) {
            $clean = $purifier->purify($array[$name]);
        }else {
            $clean = $array[$name];
        }


and replace those by
Code: Select all
$clean = $array[$name]


Note:
This will make Collabtive more vulnerable to certain types of Cross-Site-Scripting attacks.
To do such an attack, a user has to have a valid user account and has to be loged in.
Protection against SQL Injection is not affected by this.
I leave it to your judgement, if you would deactivate this :)
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Speed up loading

Postby Remiguel » 29.11.2014, 13:02

Thanks Phillip

function getArrayVal is now as shown below:

Code: Select all
function getArrayVal(array $array, $name)
{
    if (array_key_exists($name, $array)) {
       $clean = $array[$name];
        return $clean;
    } else {
        return false;
    }
}


Collabtive open as quick as before. That configuration should be safe enought on an Intranet installation ;)
Remiguel
 
Posts: 96
Joined: 10.06.2014, 09:34
Location: Spain / France

Re: Speed up loading

Postby onda » 02.12.2014, 16:30

Thanks! that has made quite a big difference.
onda
 
Posts: 95
Joined: 26.11.2012, 16:16


Return to General

Who is online

Users browsing this forum: No registered users

cron