Closed GoogleCodeExporter closed 9 years ago
The aim is to separate the operation of the entire SigPlus of Joomla.
Or to make it clear the user, what exactly is waiting while the page loads.
Regards!
Original comment by venapr...@gmail.com
on 28 Sep 2013 at 1:23
This is an excellent idea. Unfortunately, it is more difficult to implement
than it seems.
Content plug-in operation in Joomla is fundamentally synchronous. The HTTP
request is received by Joomla, which calls enabled plug-ins one after the
other, each plug-in processes the content (e.g. article text), and the HTTP
response is finally assembled by Joomla, and returned to the browser.
Synchronous requests, unluckily, can be problematic if the request takes long
to process, as is the case when sigplus has to generate preview images and
thumbnails for a large number (e.g. hundreds) of images.
In order to implement the proposal, the operation would have to be
asynchronous. In the first phase, only a placeholder would be embedded in the
page, and returned by Joomla along with the HTTP response. Then, in the second
phase, sigplus could use AJAX JavaScript in the browser to contact the server
in the background, have all the images generated for the gallery, and when
everything is ready, swap the placeholder with the generated gallery. This
would be undoubtedly an elegant solution. On the other hand, this would involve
creating an asynchronous hook that an AJAX callback can invoke, which would
certainly complicate matters. Asynchronous requests, in general, are much more
complex than synchronous requests, and more difficult to track.
Given that preview image and thumbnail generation is a one-time cost, incurred
only when the user first loads the page, I would prefer not taking any action
on this issue. sigplus is intelligent enough to trigger updates only for new
images as the gallery content changes. This means that long delays are only
truly problematic when either hundreds of images are added at once, or the
sigplus image cache has been cleared (e.g. by a sigplus re-installation). These
operations, on the other hand, are relatively rare.
Original comment by huny...@gmail.com
on 10 Nov 2013 at 2:31
Original issue reported on code.google.com by
venapr...@gmail.com
on 28 Sep 2013 at 1:19