Back in September, I wrote a quick Blog post about some optimization plans for the next (minor) version of FMJ-TagCloud.
However, the endeavor to optimize things as much as I wanted to, resulted in a much bigger update.
With that bigger update, I decided to also introduce some more functionality and thus the next minor version, became a major version.
As I am playing with the thought of introducing a cutdown free version of this module at some point, I took the opportunity and also renamed the module from "FMJ-TagCloud" to "FMJ Tag Cloud PRO"
So, without further ado, here are the details of the major upgrade, culminating to FMJ Tag Cloud PRO 2.0.0. (Download)
Tag-Data transfer with AJAX:
Until now, the tag data (the actual tags, their links and weight) were included in the page's content and sent to the user.
Depending on the tag source and generator setting and combined with the module's and Joomla's caching settings, this could cause excessive caching. Or if caching is disabled, more load on the server.
With the module's support of AJAX we can now separate the structure of the module (the container, styling and inclusion of necessary js and css) from the actual data.
This alone gives us some room to optimize the process, namely:
- the "structure" can now be cached "indefinitely", that is with a high cache time (weeks, months, ...) resulting in less effort by the server to constantly run through the entire process.
- the AJAX tag-sources can be cached per page or per menu item on the server-side for as long as necessary. This also results in not having to collect all the data and generate the final feed for the cloud.
- the AJAX response can be cached on the client, for a defined period of time. This will further reduce load on the server, as the client will serve the tag data from cache, if it has not yet expired, resulting in one less call to the server.
The caching mechanism was completely rewritten and optimized for this use case.
As mentioned in the previous paragraph, we now have the option to use both server-side and client-side caching in order to reduce load on the server and make the user experience faster.
The server-side caching mechanism now has caching styles to cache a complete module (in case of inlined data) or the structure (in case of using the new AJAX method). The three styles are:
- per site => will cache one module state for the entire site
- per menu item => will cache one module state for each menu item
- per page => will cache one module state for each page (which can be resource-heavy on big sites, but it is available as an option)
AJAX reponses have their own server-side mechanism. in that mechanism, the `per page` option is not available at the moment, but will likely be implemented in a future version.
The client-side caching mechanism works for AJAX responses only. If enabled, we can set a number of seconds to cache the data on the client.
The weight settings have been enriched, to provide even more flexibility and control over how the tags will be presented (based on their weight).
- It is now possible to select to have no weight calculation, but a static weight value at the tag-source level.
This enables the user, to have a totally flat tag cloud, not taking the tag usage into account that would affect the size of each tag.
- Weight calculation by count exists and still is the default. The options are still the same: logarithmic and linear
- An additional `Dynamic weight multiplier` has been introduced at tag-source level, in order to provide more flexibility on that level before the final tag weights will be calculated at the cloud-generator level.
This enables the user, to `flatten` out big weight differences between tags of different tag sources, before they reach the cloud generator stage.
Some improvements to the WordCloud2 library were included in this latest update.
Some fixes and a new `square` shape preset. Go play! ;)
Finally, in FMJ Tag Cloud PRO version 2.0.0 support for PHP 5.4 and 5.5 was dropped and the minimum Joomla version is now 3.6. Version 2.0.0 might still run, but is not supported on those older versions.
And, let's be honest, you shouldn't run those outdated versions anyway.
So, do yourself a favor and move up, not only to PHP 5.6, but higher - much higher to version 7.1 or even 7.2, if your Joomla and other extensions allow that.
FMJ Tag Cloud PRO is compatible with PHP 5.6 up to 7.2
That's all for now. See you soon.