<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Petko did something clever with the Thumblist recipe which also faced a
similar issue with generating many thumbnails.<br>
It now seems to be virtually unlimited by the number to process as long
as each uses < 30 second to render<br>
<br>
Simon<br>
<br>
<br>
Christophe David wrote:
<blockquote
cite="mid:447cbad00705280124n20dba0a3rd2d35e6048ac4ddd@mail.gmail.com"
type="cite">
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap=""><!---->
Thanks a lot for further improving this very useful recipe.
</pre>
<blockquote type="cite">
<pre wrap="">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.)
</pre>
</blockquote>
<pre wrap=""><!---->
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
<a class="moz-txt-link-abbreviated" href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>
<a class="moz-txt-link-freetext" href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a>
</pre>
</blockquote>
<br>
</body>
</html>