From: Paul V. <pau...@gm...> - 2007-10-04 11:04:13
|
Hi, While playing with the new tag management I've discovered a bug with our implementation (See BUG 1807418) or a limitation in URL size or Apache or PHP. What basically happens it that we pass to much data (URL length?) to our piechart.php. The current link for v2.6.22 of the kernel is already 7994 characters long. For the v2.6.23 kernel it will be even longer as there were more participants (authors). I've thought of several solution: - do all the calculations before we go to piechart.php. We currently do the calculation and limiting in piechart.php. If we limit we assign 'etc' with the rest. We could do that of course before calling and sent only 21 values (20 real ones and the "etc"). - use the database as in intermediate step for passing the data: In for example index.php or chart.php: 1. Generate the needed data strings and store it in a table 2. Retrieve the row where the data is stored 3. Pass the row number (unique id) to the graph generating script In the graph generating script like piechart.php: 4. Retrieve the data identified by the given row 5. Draw the d*mn thing. My preference is number 2 as it will also solve the huge URL's we are currently having. The downfall of number 2 is that we store stuff in the database and we have to remove it every now and then. We can't remove it straight away as that would mean the user can't click on the picture anymore. (Or we change the URL for the picture to point to index.php/chart.php with enough options to generate the chart again but that will mean performance). I already had a working prototype of number 2 a few weeks ago. I didn't find a satisfying way to delete that data in the database though. I'm thinking of doing this via a batch job that deletes data older than 1 or 2 days. This time I really like some input :-) Cheers, Paul. |