How to split components across domains with eZ Publish

The starting point of this post is an interesting asking of Marty_Nim (aka Nicolas Martinez) on Twitter about the ability to split static components across domains with eZ Publish to improve frontend performances.

Why split components across domains ?

Split components across domains is one of the advices of the Yahoo! Exceptionnal Performances team. This advice is a consequence of the behaviour of browsers that are able to download a limited number of compoments on a given domain at the same time. Following the RFC 2616, old browsers like Internet Explorer 6 or 7 are only able to download 2 components on a domain in parallel while modern browsers (Internet Explorer >=8, Firefox >=3.x, Chrome, ...) are able to download 6 or 8 ressources in parallel. Therefore, this rule is especially useful for those old browsers or if your pages use a lot of different components. It's also not recommended to use too much different domains because of the DNS resolution latency.

In eZ Publish

In eZ Publish, it is very easy to implement this advice for JavaScript files and CSS stylesheets provided the ezjscore operators (ezcss* and ezscript*) are used to include those files. In fact, the ezjscore extension allows to specify a custom hosts depending the extension of the included files. For instance, it's possible to write the following settings in an override of ezjscore.ini file :

[Packer]
CustomHosts[.js]=http://media1.pwet.fr
CustomHosts[.css]=http://media2.pwet.fr 

With those settings, eZ Publish will include the JavaScript file(s) from http://media1.pwet.fr, while CSS stylesheets will be included from http://media2.pwet.fr. The later case has an interesting side effect, because the background images used in the CSS files will also be fetched from the custom host.
And what about others components that are directly embed in templates ? Currently, there's no out of the box solution, but as explained by Gaetano on Twitter, since eZ Publish 4.4, it's possible to override template operators so it's possible to write something similar for images, flash, ... embed with ezimage, ezdesign or ezroot template operators even if this should probably be a native feature.

Release of admin2++ extension version 0.2 for eZ Publish 4.4

As I said on Twitter, I started again to develop the admin2++ eZ Publish extension, and the result is the release of the version 0.2. As I previously wrote in Frontend performance enhancements with admin2++ eZ Publish extension and in GUI enhancements with admin2++ eZ Publish extension, I try to reach two goals with this extension :

  1. Improve the performance frontend of the admin interface
  2. Provide some missing GUI features and ease the use of the admin interface

The following screencast shows most of the available features of the admin2++ extension version 0.2 :

As you can see, the biggest new feature of this release is the preview available in the popup menu. Instead of loading a new page with the preview, admin2++ provides a view of the object in the front end siteaccesses without any page refresh. I also made a big work to preload as much components as possible on the login form to fill the browser's cache. With the use of the right Apache configuration, this has a great impact on the page loading time.

Quelques liens en vrac

Encore quelques liens glanés ci et là; ça va finir par devenir le rendez vous du jeudi midi, enfin ce n'est que la deuxième fois ;-)

Au menu, performances, php, une radio geek et développement d'applications mobiles :

Quelques liens en vrac

En attendant d'avoir le temps d'écrire des articles avec un peu plus de contenu, voici quelques liens glanés ci et là ces derniers temps sur un peu tout :

Performances improvements of eZ Publish 4.4

As in almost every new release, eZ Publish is announced to perform better than the previous release This was true when 4.0 was released and also for the version 4.1. And what about the new 4.4 ?

As I wrote earlier (in french), eZ Publish brings a new session system that only creates a session when it's needed. Now, it's also possible to configure the way sessions are stored, by default the file system is used instead of the database in the previous versions. In terms of performance, this new feature is promising and since my upgrades, I find the pages more responsive but it was only a feeling.

Today, I check the crawl graphs generated by Google Webmaster Tools. The following chart shows the download time of pages by Googlebot. I think the change is quite clear (the green line represents the date of the upgrade) :

The chart of Planet eZ Publish.fr is also interesting :

it's interesting because just after the upgrade, I discovered an issue with the static cache on this site so I disabled it and as we can see, the difference between the static cache setup and the classical setup is not that big on this site !

Obviously, those results are only valid on my sites. One thing to mention is that Googlebot doesn't support session, so before eZ Publish 4.4 each time the robot requested a page, a new session was created and thus a new entry in the ezsession table was added. For normal user, this behaviour is only true the first time he visits the site. then the new session system only avoids one SQL SELECT query.

Flux RSS des billets

Flux RSS des billets

Rechercher sur pwet.fr

À retenir

Derniers commentaires

Archives

Nuage de tags

Bioutifoul photos

Quelques liens

Licence d'utilisation

Contenu sous Licence Creative Commons By-Sa

Sauf mentions spécifiques, les billets et les photos publiés sur ce site sont placés sous la licence Creative Commons by-sa.

Pour toute utilisation dépassant le cadre de cette licence, merci de me contacter par e-mail.