https://bugs.winehq.org/show_bug.cgi?id=47900
Bug ID: 47900 Summary: Enable caching of screenshots and log files Product: Wine-Testbot Version: unspecified Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: unknown Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
web/Screenshot.pl and web/GetFile.pl systematically disable caching of the files they return by setting their Last-Modified field to the current time.
For Screenshot.pl this may have been to deal with live screenshots that were updated regularly. But even so this should probably be done through the Expires field instead. Anyway we don't have live snapshots anymore and when they come back it will (most likely) be in the form of a timestamped filename so that once written a file would not change.
The only case where a file may change is when a job is canceled and restarted. That does not seem to warrant disabling caching altogether.
https://bugs.winehq.org/show_bug.cgi?id=47900
--- Comment #1 from François Gouget fgouget@codeweavers.com --- Note: we may want to load log files piecemeal at some point. That may interact with the caching. Though at that point the right thing to do would be to have some JavaScript + web API so it's not necessary to reload the whole page to get an update!
https://bugs.winehq.org/show_bug.cgi?id=47900
--- Comment #2 from François Gouget fgouget@codeweavers.com --- By "load log files piecemeal" I meant retrieving them from the VM progressively. This means the file on the web-server side may be updated multiple times. But that can certainly be dealt with through the Last-Modified HTTP field.
On another note, sending the screenshots, patch file and test executables should not involve the perl scripts at all. The web server would to that much better and faster.
The two reasons scripts have to get involved are: 1. Because the screenshots and logs are stored in a location that's not 'accessible' to the web server. 2. So they can disable caching which does not really make sense.
There is no file in var/jobs that contain any sensitive information: the only extra files are raw logs (which one can now download) and reference logs. So for point 1, either the web server configuration should be modified so we can build URLs that reference files in that directory, or these files should be moved to a suitable location (to be defined).
For point 2, using the files mtime should be just fine so I expect the web server's default handling to be what we want.
https://bugs.winehq.org/show_bug.cgi?id=47900
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major
https://bugs.winehq.org/show_bug.cgi?id=47900
--- Comment #3 from François Gouget fgouget@codeweavers.com --- Increased the priority a bit because: * This wastes web server (and user) bandwidth (and slows down page loads). * This wastes CPU cycles on the web server which already has a pretty high load. * This can lead to increased memory usage by the web server processes (particularly when combined with bug 47901) which may contribute to thrashing when rogue spiders crawl the TestBot.