diff mbox series

[OSSTEST,58/60] sg-report-host-history: Cache report_run_getinfo

Message ID 20200814172205.9624-59-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Speed up sg-report-job-history | expand

Commit Message

Ian Jackson Aug. 14, 2020, 5:22 p.m. UTC
No logical change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sg-report-host-history | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sg-report-host-history b/sg-report-host-history
index efe652bb..a814ef37 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -266,7 +266,9 @@  END
 
 	print H "<td><a href=\"$url\">$jr->{job}</td>\n";
 
-	my $ri = report_run_getinfo({ %$jr, %$ir });
+	my $ri = cacheable_fn($jr, 'rri', sub {
+            report_run_getinfo({ %$jr, %$ir })
+	});
 	print H "<td $ri->{ColourAttr}>$ri->{Content}</td>\n";
 
 	my $powers = cacheable_fn($jr, 'b', sub {