How do you improve the speed of an Elgg site?

This questions is already asked many times in cummunity discussions.

From last 4-5 days community.elgg.org is responding very quickly and dramatically improve in TTBF which is from 2.0-3.0 sec to 0.200-0.300 sec.

So my question is that what you guys done to improve that. I am also facing slow TTFB on my elgg based website, even I am on fast vps. I tried a lot to improve this but no success.

I will really help me if some one provide any info to improve this.

FYI:- I have two websites on same server but second website is responding 5x times better then elgg with same load.

  • Emmanuel Simond

    Depends mainly on the number of widgets/plug-ins used.

    While the core engine can generate the page quickly (tens of sec) 

    and flush it to the client. Neverthelesss, the HTML source generated is

    quickly getting full of  <script type="text/javascript" ...

    <link rel="stylesheet" href="... and even extra HTTP request

    like  <link rel="SHORTCUT ICON" misplaced in the header (at the beginning! of

    the source page, before the mandatory JS & CSS!. 1 HTTP request wasted....)

    This problem is common to all "plug-ins enabled" CMS and others engines.

    A browser can handle 4 HTTP requests simulateously

    The key is to MERGE all these HTTP requests.

    1 for ALL the CSS, 1 for ALL the JS

    And the pages will popup instantly.

    EXTRA TIPS: Place the fat JS sources like jQuery aso

    at the end of the page, AFTER the rendering of the page.

    Doing so, the browser can 1st render the page, then

    load all theses lengthy javascripts

  • few days back we upgraded our home site to Elgg 1.8.3. We have listed all the updates and tweeks we made on elgg at http://webgalli.com/blog/upgrading-team-webgalli-site-elgg-183/ .

    Looking forward to Brett's solutions for more better optimizations of Elgg.

  • @Team Webgalli  very usesful tips regarding optimization of Elgg 1.8.3.  Thanks for sharing!

  • Emmanuel Simond

    Hi again,

    Just found the ewinslow (Evan Winslow)'s CSS & JS Minifier for Elgg:

    https://github.com/ewinslow/elgg-minify

  • Hi - I'm not so often here as a writer, because I'm very busy, but I followed this discussion.

    I wonder if the elgg core team considers to change the mysql database for the future to a noSQL database.

    I am currently working an a migration for a product database for the shopping area of my website fitnesswelt.com, where also is running an older elgg community version with some thousends of users.

    The main reason for using a new database for the products is, I'm not longer able to handle more than a million products with their categories, subcatogories etc. in an acceptable time frame - that affects downloading the data from the networks, create index over the data, live search for the users. Thats all boring slow - downloading and generating indexes takes hours every night.

    I decided to give a chance to a noSQL Database. After some investigation I choosed mogodb. Now I'm working on the migration, and it's pretty cool stuff!

    Using of noSQL databases may be a hype, but in my opinion it would be the best way for the future for Elgg large communities to handle huge databases. Performance is a killer argument for using mongodb for elgg, but not the only one. I see the concept of elgg saving data is an ideal candidate for a schemaless noSQL database, much more suitable for that task than mySQL or any other relational database.

    Take e.g. the users profile: In a relational database you usually have a table for the users and one field for every property, like gender, age, name, phone number etc. You probably would save things like interests or tags in a separate table and create a relation.

    In elgg saving is different, and it's more like in a noSQL Database organized. You can add a property without changing the schema.

    In mongodb you don't have any schema - you simply add the new property. If you decide, from now on your users have an additional field in their profiles, you simply have to add this with you next insert.

    There are so much more reasons to consider mongodb - just think about autosharding - that means: Scale horizontally about as much maschines as you like without compromising functionality.

    I think about to migrate my own elgg database in one of my next projects, and than I consider to offer this as consulting service for other elgg admins.

    Its really cool stuff - if someone is interested to migrate his large database in the future to mongodb - please drop me a note, or discuss it here.

    You will find an article about production usage of mongodb as far as I'm having it to live at my site under http://community-software.com/

  • Cassandra is coming... (tease)

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.