Legacy mode is actually a Joomla! system plugin. It allows you to use extensions that were written for Joomla! 1.0.x (and even Mambo) in you 1.5 site. It is a part of the core distribution of Joomla!, but it is disabled by default. It is said to offer over 90% backwards compatibility. There seems to be some misunderstanding in the Joomla! community about legacy mode.
It is considered by many to be a 'bad thing', that should be avoided at all cost. But in fact:
Joomla! v1.5RC4 + PHP5 + Legacy mode = Super efficient!
DOCman v1.4 is a good example of an extension that works in both Joomla! 1.0.x and 1.5. During development, we encountered a number of issues in the legacy plugin in the subsequent Joomla! release candidates. These were reported and fixed, so legacy mode has become very stable. If it works with a huge and complex extension like DOCman, it should work with others as well.
On major issue was memory usage. Turning on legacy mode had a major impact on each pageload, even when the page didn't use any legacy extension at all. Johan and I did a bunch of experiments with PHP5's autoloading feature, and implemented the results in the Joomla! core. I did some test, using clean installs of RC3 and RC4 (rev 9627 to be exact), with the sample data. I measured the default frontpage and the back-end's control panel, each with legacy on and off. Of course for accurate results, you'd need to use a more extensive approach, testing with real world situations instead of just a couple of pages.
As you can see in the table and the graph, the results are pretty spectacular: Whereas turning on legacy mode in RC3 results in a boost of of about 1.30Mb, the difference is hardly noticeable in RC4. A megabyte might not seem much, but if your site serves a thousands pages per minute, it quickly adds up. Compared to RC3, the new release uses 15-19% less memory in legacy mode.
The downside is that this only works with PHP5. But hey, why are you still using PHP 4? On the plus, the autoloading implementation has one great benefit: it can be used everywhere in Joomla! Keep an eye on this blog, I'll write a post on how to use autoloading in your own extension soon.
| Joomla! Memory usage in Mb | ||||
|---|---|---|---|---|
| v1.5RC3 | v1.5RC4 | Gain (Mb) | Gain (%) | |
| Frontend | 5.54 | 5.54 | 0 | 0 |
| Front + Legacy | 6.96 | 5.90 | 1.06 | 15.23 |
| Backend | 4.45 | 4.32 | 0.13 | 2.92 |
| Back + Legacy | 5.73 | 4.65 | 1.08 | 18.85 |
Resource: joomlatools




