skypanther
Exalted Code Master!
I have a client that once or twice a year needs to print out a report containing a lot of data--a couple of hundred database records with up to four photos each which must be resized before including in the report.
Ultimately, they'd like a PDF file out of this. Right now, I have a page that with some CSS does a fairly decent job of outputting their data in the format they want. But the script takes a long time to run (many minutes). It involves dozens of db queries, plus the PHP to do the image resizing and output. Thus, it puts a rather heavy burden on the shared servers here.
I guess I'm going to modify the script to use AJAX to pull each record individually, so that the data is at least pulled asynchronously with many but smaller page requests. That would eliminate the PDF output option, though. And, it just trades one big request for lots of smaller ones.
Before I go twiddling code, I was hoping maybe someone could offer some alternate strategies that I could investigate. A more efficient programming scheme would be nice. But, I'm even thinking non-webby stuff too. Like, some sort of way to dump and FTP the data to a local PC and then do the processing offline. But, it has to be automated and simple, as they aren't very tech savvy.
Thanks,
Tim
Ultimately, they'd like a PDF file out of this. Right now, I have a page that with some CSS does a fairly decent job of outputting their data in the format they want. But the script takes a long time to run (many minutes). It involves dozens of db queries, plus the PHP to do the image resizing and output. Thus, it puts a rather heavy burden on the shared servers here.
I guess I'm going to modify the script to use AJAX to pull each record individually, so that the data is at least pulled asynchronously with many but smaller page requests. That would eliminate the PDF output option, though. And, it just trades one big request for lots of smaller ones.
Before I go twiddling code, I was hoping maybe someone could offer some alternate strategies that I could investigate. A more efficient programming scheme would be nice. But, I'm even thinking non-webby stuff too. Like, some sort of way to dump and FTP the data to a local PC and then do the processing offline. But, it has to be automated and simple, as they aren't very tech savvy.
Thanks,
Tim