Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350118

Summary: Should automate conversion of index.php to index.html
Product: [WebTools] WTP Releng Reporter: David Williams <david_williams>
Component: relengAssignee: webtools.releng <webtools.releng-inbox>
Status: NEW --- QA Contact: Carl Anderson <ccc>
Severity: normal    
Priority: P3    
Version: 3.10   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2011-06-23 01:57:39 EDT
It is especially noticeable during "release", when infrastructure is very busy, but our "index.php" pages take a long time to load. This is partially because they are computing if some other file exists, and file io slows down when system is busy. 

Our index.php file is dynamic ... but, barely so. Usually, once the build is completely done, the only thing that's dynamic is what directory it is in ... either in 'committers' or on 'downloads'. 

Typically, when I notice the system is slow, and our download page takes a long time to display, I'll login to system shell, change to our 'downloads' directory, and convert the index.php file to index.html with a simply command: 

php index.php > index.html 

(executed from the directory where index.php resides). 

This makes out download page very snappy ... and, it is good for the whole infrastructure, to not re-compute things which essentially never change. 

Note: we can not do this on "committers" area, and then copy over to downloads directory ... some computations would not be correct. 

Note: the infrastructure's web server is set up to serve "index.html" before "index.php" (if found) so using the normal "directory URLs" work just fine. No one should refer specifically to "index.php" or "index.html". 

So ... point of this bugzilla entry ... we should consider automating this php-to-html conversion, since it results in much better performance of page display. This could probably be made part of our promote.sh script.
Comment 1 David Williams CLA 2011-06-23 02:02:18 EDT
Oh, and meant to say, I didn't figure all this out for myself :) ... Matt, I think, did it once for us when system was being swamped. I subsequently searched the internet for this "trick", and discovered that some people or sites routinely do it ... such as in a cron job, that runs every hour or once a day. Our index.php is not dynamic enough to justify that, but I found it interesting.
Comment 2 David Williams CLA 2011-06-23 02:15:18 EDT
Oh, and should add ... we'd probably have to "correct" the index.html file by recomputing it, or remove it, when we move a build to "archives".
Comment 3 David Williams CLA 2011-10-15 14:40:05 EDT
Note to self (or, to anyone who actually implements this in an automated way):

It would be a great feature to add an extra line (even if in small print) to the generated html page, that would say something like "generated on <date> <time>" (where, date and time were the time the script ran). 

I say this since working on some "old" test machines, I was seeing very confusing results, not realizing, for a while, that the browser was picking up an old index.html file, instead of using index.php and doing a fresh "compute" of the current directories. 

Just an idea I didn't want to lose.