Petko did something clever with the Thumblist recipe which also faced a similar issue with generating many thumbnails. It now seems to be virtually unlimited by the number to process as long as each uses < 30 second to render
Simon Christophe David wrote: >> I've just updated the import.php script with an $ImportTime variable >> to indicate the maximum amount of time (in seconds) that the script should >> spend importing files. The default is 15 seconds. >> > > Thanks a lot for further improving this very useful recipe. > > >> If time expires before import has finished processing files, it attempts >> to change the timestamp of the .lastimport file so that it will continue >> processing more imports on the next browse request. (Regardless, it will >> check things again after $ImportFreq seconds have elapsed.) >> > > This does probably not contribute to the expected result: when you > have say 3.000 pages to import (small ones with only a few > PagetextVariables ;-) ), all visitors (or always the same visitor if > there is only one active) will have all their requests taking 15 > seconds, and the CPU will be loaded as is there was no "regulation" > mechanism, possibly triggering alarms and/or problems with the hosting > company. > > With the initial version of your script, I modified the loop to exit > after 5 seconds, and set $ImportFreq to 20 seconds. This way, not all > requests appear to be slow to the visitors, and the total CPU load > cannot exceed 3 peaks of 5 seconds every minute. Of course, it took 4 > hours before all my new pages were imported, but I can live with that, > and none of the users complained (maybe we should study the psychology > of the web surfer more in detail ;-) ) > > In conclusion, I would suggest to reconsider the .lastimport file > "touch" when there remain files to be imported, or to make it > configurable too. > > What do you think ? > > Thanks again for all this. > > Christophe > > _______________________________________________ > pmwiki-users mailing list > pmwiki-users@pmichaud.com > http://www.pmichaud.com/mailman/listinfo/pmwiki-users > >
_______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users