[Koha-bugs] [Bug 15968] New: Unnecessary loop in C4::Templates
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Mar 3 12:35:01 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15968
Bug ID: 15968
Summary: Unnecessary loop in C4::Templates
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: jonathan.druart at bugs.koha-community.org
Reporter: jonathan.druart at bugs.koha-community.org
QA Contact: testopia at bugs.koha-community.org
>From C4::Templates::output
# add variables set via param to $vars for processing
for my $k ( keys %{ $self->{VARS} } ) {
$vars->{$k} = $self->{VARS}->{$k};
}
This loop is not necessary, we could do the same with
$vars = { %$vars, %{ $self->{VARS} } };
After a quick benchmark, it gains 100 microseconds when we pass 170 vars to the
template.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list