Created attachment 496189 [details] [diff] [review] patch, v1 This patch makes get_names() in report.cgi much faster. For instance, I created two products with 1000 components each, and then wanted a tabular report with components and severity as column and row: without the patch: 135 ms with the patch: 89 ms Then, I selected two other fields, which don't have as many items: without the patch: 124 ms with the patch: 3 ms (!!!) This huge win is due to the fact that the old code was getting legal values for *all* existing select fields, even if those are not the ones selected by the user. I also fixed the O(n^2) problem. Globally, this patch makes the whole report.cgi script only a few percents faster, but this is still good to take. Granting myself review as I'm allowed to refactor and clean up the code myself in the report/charting component.
Committing to: bzr+ssh://email@example.com/bugzilla/trunk/ modified report.cgi Committed revision 7616.