K4kArot2015 / sigplus

Automatically exported from code.google.com/p/sigplus
0 stars 0 forks source link

Prompt updates gallery #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!
Now update the gallery through the SigPlus can significantly increase the load 
a Joomla!

During the process SigPlus and the update caused the page is blank and worries 
of "spinning wheel"-like server problem.

Is it possible to:
Idea one:
- At this time, for example, a message appeared gallery is being updated please 
wait?

Or another idea much better:
- The article was loaded without the galleryin the place has been updated 
gallery display a message such as "being updated gallery. Me a while to refresh 
page again."

Best Regards!

Original issue reported on code.google.com by venapr...@gmail.com on 28 Sep 2013 at 1:19

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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