Moodle Bloat.

Moodle Bloat.

by Peter Vitez -
Number of replies: 6

Is there any chance of a project to improve Moodle's speed, or create a lean version without so much of the current code clutter?

It's not about the server speed, the sheer number and Kb of files that a client has to download is nuts! Even Moodle's own front page loads 36 files and 8 scripts (the biggest being the rather worthless overLIB.js at 49000 bytes! and all it does is mouse-over text!)

So before I recommend to my school to abandon Moodle for a leaner competitor, can someone give me hope that the next version will improve performance, or will it be just about adding even more features?

Average of ratings: -
In reply to Peter Vitez

Re: Moodle Bloat.

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Peter,

Performance is always important to the moodle developers, many of us manage large scale moodle installations where performance is vital!

quite a bit of work went into 1.9 regarding structure of code, and the number of queries to the database, but there is always room for improvement!

The biggest performance gain you can get is by tuning your webserver correctly (I think I saw in a previous post that your were using a windows server?) - unfortunately the number of people with large busy installations under windows is limited, and sometimes the easy solution is to throw more hardware at it..

If you are using IIS - make sure you experiment with fastcgi - I've seen 50-60% performance gains in different areas with this, but you will need to a bit of testing with it first, as there aren't many people using it yet.

You should also investigate the use of a PHP Accelerator, although if you are using Windows, you may need to research and test this extensively - make sure you post your findings here!

As a larger institution, you may have internal developers who are able to contribute to the community by posting performance related improvements to the Moodle Tracker for the development team to review. - (or if you have $$ but no developers... there are a few options there too....)

smile

Dan


Average of ratings: Useful (1)
In reply to Peter Vitez

Re: Moodle Bloat.

by Martín Langhoff -
> create a lean version without so much of the
> current code clutter

Make sure you are using 1.9 and, as Dan hints, there is a lot of tuning you can do for performance. And then turn off blocks. Blocks are a major drain.

> worthless overLIB.js

Worthless and cacheable. It gets fetched once, and kept for good. Such is the http 1.1 world.
Average of ratings: Useful (1)
In reply to Martín Langhoff

Re: Moodle Bloat.

by Peter Vitez -

Thanks for the tips guys, but my concern isn't server speed. Students on broadband don't have complaints. It's the 56k modem users that suffer. What I would really like to see is a low bandwidth version which uses minimal graphics and CSS and a lot less scripting. Perhaps much of this could be achieved with a cut-down Theme?

>Worthless and cacheable. It gets fetched once, and kept for good. Such is the http 1.1 world.

...yes but processors still have to find-open-read the 14900 line file every time it's requested, even if it is in the client's cache - not to mention the other 10 js files included in the overlib folder for a total of 101 KB. My qualm is that it exists at all when the task it performs can be done in a few lines of css and minimal javascript, and my concern is that there are many other 3rd party apps in the lib that are also not optimised for Moodle that may be bogging it down?

In reply to Peter Vitez

Re: Moodle Bloat.

by Samuli Karevaara -
"low bandwidth version which uses minimal graphics and CSS and a lot less scripting"

The standard theme has only 4k of graphics. The CSS is a bit of a monster with 119k. Moodle has quite a few corners to cover, if you were to start from a blank CSS. An obfuscated version is hard to maintain, and obfuscating on demand hogs processor resources. A work-version + an automatically obfuscated production version of the standard CSS files, maybe?

"the 14900 line file"

overlib.js is a bit wordy for a pop-up library, but luckily there is one zero too many in that line count smile
In reply to Peter Vitez

Re: Moodle Bloat.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
As someone said, the bigger files are only loaded once per session generally, because they are designed to cache.

We are talking in various corners about ways to streamline the CSS files in future. It's not easy, Moodle isn't simple, but there are things to improve for sure, such as more consistent design across modules.

In the meantime, you can try some of the things people have suggested here plus things like:

- use mod_gzip on the server to compress things (moodle.org does this for example)
- stick with the "standard" themes
- examine some other big web apps and you might be surprised how fat many of them actually are!