Feng Forum

Support => How To's => : choiceoutsource May 09, 2011, 12:53:03 PM

: Speeding up FENG?
: choiceoutsource May 09, 2011, 12:53:03 PM
Hello, will be glad if you guys can share tips on how to speed up FENG? We using it on a small office of 10 people and seems its getting slower every week.

Any tool to do a DB cleanup? Any caching solution? Thanks,
: Re: Speeding up FENG?
: choiceoutsource May 19, 2011, 10:36:12 AM
any reply?
: Re: Speeding up FENG?
: franponce87 May 23, 2011, 12:59:49 PM
You may use APC in order to store in cache some values (take into account no documentation about this has been released yet, but yes, it is implemented in the 1.7.4 onwards).
No idea how many emails do you have as well, but if you are able to delete old ones and you have thousands of them, you could  do that too.. plus the fact of using the latest Feng Office version available.

Take into account that it's getting 'slower' every week could be understood with many variations.. plus no idea about the context.

Best regards,
Francisco
: Re: Speeding up FENG?
: goaugust June 02, 2011, 10:59:01 AM
How much of a performance difference is there between archiving items and trashing items?
: Re: Speeding up FENG?
: choiceoutsource June 03, 2011, 01:32:16 PM
I would like to know that too.
: Re: Speeding up FENG?
: gmuslera June 07, 2011, 02:28:18 PM
Hello, will be glad if you guys can share tips on how to speed up FENG? We using it on a small office of 10 people and seems its getting slower every week.

Any tool to do a DB cleanup? Any caching solution? Thanks,

There are things that you can speed up, code and database.

For code Fengoffice supports both APC and Xcache for caching php object code, that speed up pure php execution. Also in 1.7.4+ supports APC for caching variables, mostly from database queries, so improves speed too in that front. It requires some memory for that php code and variables, but makes a good improvement there.

For database (and the "getting slower every week" point in that the problem is around there) you can tune MySQL parameters or how it is installed to improve performance.
: Re: Speeding up FENG?
: choiceoutsource June 07, 2011, 08:01:49 PM
Hello, will be glad if you guys can share tips on how to speed up FENG? We using it on a small office of 10 people and seems its getting slower every week.

Any tool to do a DB cleanup? Any caching solution? Thanks,

There are things that you can speed up, code and database.

For code Fengoffice supports both APC and Xcache for caching php object code, that speed up pure php execution. Also in 1.7.4+ supports APC for caching variables, mostly from database queries, so improves speed too in that front. It requires some memory for that php code and variables, but makes a good improvement there.


Can you put me in the directions on how to get that done? Do I need to mess on any code or is it something that needs to be installed on the server?

Thanks,
: Re: Speeding up FENG?
: moorezilla June 07, 2011, 09:47:02 PM
APC and Xcache are applications that speed up PHP generally. They are not related to Feng per se, but they could certainly speed up the PHP aspects of Feng. Depending upon how you have Apache/PHP compiled, they can be very easy to install (sometimes as easy as apt-get or yum), but they do need to be installed on the server; they have nothing to do with Feng code... other than having the potential to speed up Feng's PHP.

Optimizing MySQL can be dicey, but it could also be as easy as changing settings in your my.cnf config. Scripts like day32.com/MySQL/ can give suggestions. Mileage can vary. If you have your server hosted at an ISP, they'll usually accept a ticket for both installing the opcode and for tuning mysql for performance. Someone who is good at tuning mysql can do wonders for performance. APC and Xcache can also be a good kick in the pants for php, but be aware that some php applications do not run well with one or the other. Kind of a trial and error thing, but if they don't run well, you'll be able to tell easily. Only an issue if you have other php applications running alongside Feng.
: Re: Speeding up FENG?
: franponce87 June 24, 2011, 02:45:39 PM
We currently are using APC to keep some values in cache, and it is quite faster.
As to trashing/archiving, trashing objects you do not need makes Feng Office faster, but if you want to recover them in a future.. archive them.

Remember the objects first go to the trash and THEN get deleted.

Best regards,
Francisco
: Re: Speeding up FENG?
: nicname June 29, 2011, 01:11:21 PM
I also would recommend to use APC, installation takes only a few minutes, and further optimization of the configuration is also not a very time consuming task

On the other side:
What are the specs of the server FengOffice is running on?
Which OS, PHP & MySQL Version, wich Web Server. And, also the configuration files, memory limit of PHP, the limits of MySQL, is the Fengoffice Database in a InnoDB enviroment or MyISAM, etc.
: Re: Speeding up FENG?
: gmuslera June 30, 2011, 03:43:45 PM
Is not "the" server that runs Fengoffice, but a lot of them, not all equal fitting special needs, but in general all use CentOS 5, php 5.3.x, MySQL with InnoDB as engine... and using as much memory we can in each particular case (query_cache and innodb_buffer_pool_size are big components of it). As it depends on the installation, numbers good for one case could not be as good for others.
: Re: Speeding up FENG?
: nicname July 01, 2011, 05:21:07 AM
my question was more about choiceoutsource server where he uses FO
: Re: Speeding up FENG?
: Murz July 09, 2011, 09:55:46 AM
I think that we need to speedup js load time (and number of ajax requests), because PHP and MySQL works very quick (less than 1 second), but for view task via URL I need to wait 5-15 seconds when ExtJS loads all objects and render.

So, after opening url (http://example.com/index.php?c=task&a=view_task&id=483) after less than one second I see the template and frame items, but after that I see JS "Loading..." message and this "Loading..." process goes 5-15 seconds.

Speeding up of php and mysql didn't increase process when ExtJS loads and renders interface elements (workspace tree, tags, other).

I think better is to modify page load process to display at first current object info (task, note, etc) and after displaying it - do the background load of other interface elements (projects tree, tags, etc).

I look at the Jquery UI interfaces and they loads many times quicker, maybe the problem is in ExtJS library - loading it spend the all page load tima? Maybe try to move interface from ExtJS to Jquery UI?
: Re: Speeding up FENG?
: nicname July 11, 2011, 07:52:23 AM
in this case, set the righjt headers for caching js and images within you webserver (so that they are kept for a few weeks) and combine all the javascript files,

simply go to

youdomain.tld/public/tools/ and click on combine js and css


after this you need to edit your config.php and set the two constants COMPRESSED_CSS and COMPRESSED_JS to true.

this dramaticaly reduces the loading time


BUT:! it only works with the stantdard theme of feng not with any custom design
: Re: Speeding up FENG?
: Murz July 11, 2011, 08:51:57 AM
in this case, set the righjt headers for caching js and images within you webserver (so that they are kept for a few weeks) and combine all the javascript files,

simply go to

youdomain.tld/public/tools/ and click on combine js and css


after this you need to edit your config.php and set the two constants COMPRESSED_CSS and COMPRESSED_JS to true.

this dramaticaly reduces the loading time
Did you test this on your server? Can you post results before and after this operations?

I think that this will not dramatically increase page load time, because time, spent to load CSS, images and JS (in my tests with http://demo.fengoffice.com/en/index.php?c=access&a=index page) on second time are zero, because all loaded form cache.
Here is page load time chart:
http://wstaw.org/m/2011/07/11/plasma-desktopXN3057.jpg
http://wstaw.org/m/2011/07/11/plasma-desktoppR3057.jpg

So, compressing js and css didn't improve average page load time. It increase time for new visits, but most of visits will be done with registered users, so all static data will load from cache.
: Re: Speeding up FENG?
: Murz July 11, 2011, 09:16:26 AM
Here is chart for opening task page process on demo site: http://wstaw.org/m/2011/07/11/plasma-desktopNT3057.jpg - 2.62 seconds.
It is not slow, because demo have not many projects and tasks.
And here is chart for opening task in our system: http://wstaw.org/m/2011/07/11/fo1.jpg - 5.48 seconds.

System have about 100 projects and 4000 tasks, 100 documents, 200 notes, 10 tags.

So, as you see, 1830 ms (milliseconds) spend to generate first page (index.php) and other - for JS and AJAX requests:
Total JS: 652 ms
Total AJAX: 4267 ms (4 seconds!)

Slowest JS: 145 ms - load language translate strings
Slowest AJAX: 2239 ms - //?&ajax=true&active_project=23&c=task&a=view_task&id=483&utz=4&current=overview-panel&_dc=1310385308612 (load current task with id from url)

Next slowest AJAX: 957ms - load tags with number counts.

Task page ajax load process started only after 3.13 seconds after page load started.

So, if we start load task at first page load (without ajax), we will render page (to see the task) with the 2.5 seconds instead of 5.48 - more than 2 times speedup.

To load CSS we spend 595 ms, to JS - 635 ms, so combining and compressing js and css will increase page load time by 0.2-0.5 second maximum (because after this we must spend time to pase js and css anyway).

Tests are done with Chrome browser, so every user can repeat it in his system and detect slowest parts of page rendering process.
: Re: Speeding up FENG?
: nicname July 11, 2011, 09:42:38 AM
I know this was just an answer to the statement that css and js loading takes a lot of time. time

Of course this doesn't affect the server load, but if you use feng over a small bandwidth connection it helps,
I only use JS combining because css combining destroys my own stylesheets.


: Re: Speeding up FENG?
: Murz July 11, 2011, 09:49:17 AM
I know this was just an answer to the statement that css and js loading takes a lot of time. time

Of course this doesn't affect the server load, but if you use feng over a small bandwidth connection it helps,
I only use JS combining because css combining destroys my own stylesheets.
As I see in logs, JS and CSS loads from server only at first page load time, all other times they loads from browser cache. So, users got slow load only on first login in browser, and all other times (next day, week, etc) css and js will loads locally from browser cache.
: Re: Speeding up FENG?
: nicname July 11, 2011, 10:06:32 AM
which is exactly what you said in your last post  ;)
: Re: Speeding up FENG?
: Murz July 13, 2011, 05:44:21 AM
Also I find in logs long queries for load each avatar (0.2 to 1 sec) and they are not cached. Queries to load avatar are like this:
/index.php?c=files&a=get_public_file&id=0e14fdce887ecc3141a9e26a9ee8f3cf73cd3368
: Re: Speeding up FENG?
: Murz July 13, 2011, 10:12:17 AM
FengOffice when preparing to render page, every time loads same info (users, project list, modules objects, etc). So, we can load it only once at first time and cache in memory (via apc cache or memcached), and for second queries - don't touch database and get them from cache.
If something changed (for example, project modified) we can drop cached object and on page load script rebuild it.
I think that this must greatly improve response time of index.php script .

And maybe better to use not index.php but separate script for ajax queries, but separate script in which we can remove unnecessary processes and queries?
: Re: Speeding up FENG?
: IGaDI March 18, 2013, 01:52:43 AM
How to reduce the number of queries to the database, or very slowly began to work fengoffice