I have been slow to push anything much since I pushed that big one to give a little time.  I can revert that patch set which is still an option <span></span><br><br>On Wednesday, February 10, 2016, Marcel de Rooy <<a href="mailto:M.de.Rooy@rijksmuseum.nl">M.de.Rooy@rijksmuseum.nl</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Too bad, especially since we already have performance issues..<br>
I would go for option 1 part a = revert. (It is one of the last pushes, I think.)<br>
And some further research on 2,3 or 4 ? :)<br>
<br>
________________________________________<br>
Van: <a href="javascript:;" onclick="_e(event, 'cvml', 'koha-devel-bounces@lists.koha-community.org')">koha-devel-bounces@lists.koha-community.org</a> [<a href="javascript:;" onclick="_e(event, 'cvml', 'koha-devel-bounces@lists.koha-community.org')">koha-devel-bounces@lists.koha-community.org</a>] namens Jonathan Druart [<a href="javascript:;" onclick="_e(event, 'cvml', 'jonathan.druart@bugs.koha-community.org')">jonathan.druart@bugs.koha-community.org</a>]<br>
Verzonden: woensdag 10 februari 2016 15:49<br>
Aan: <a href="javascript:;" onclick="_e(event, 'cvml', 'koha-devel@lists.koha-community.org')">koha-devel@lists.koha-community.org</a><br>
Onderwerp: [Koha-devel] Huge performance issue cause by bug 13618 (XSS)<br>
<br>
Hi devs,<br>
<br>
I have a very bad news...<br>
Working on bug 15715, I have found that the patchset introduced by bug<br>
13618 (Prevent XSS in the Staff Client and the OPAC) causes a very<br>
important performance issue.<br>
<br>
Indeed, for each variable displayed in the template, a<br>
Template::Stash::AutoEscaping->get method is called.<br>
<br>
To try and understand the problem, I have put the following snippet in<br>
the <a href="http://mainpage.pl" target="_blank">mainpage.pl</a> script:<br>
+my @loop;<br>
+for my $i ( 0 .. 10000 ) {<br>
+    push @loop, {<br>
+        foo => 'my foo',<br>
+        bar => 'my bar',<br>
+    };<br>
+}<br>
+$template->param( loop => \@loop );<br>
<br>
and then, in the template<br>
+[% FOR l IN loop %]<br>
+    [% l.foo %] [% l.bar %]<br>
+    <br/><br>
+[% END %]<br>
<br>
It will display 10k foo and 10k bar<br>
There are indeed 20k (+ delta) calls to the<br>
Template::Stash::AutoEscaping method, as expected.<br>
But the load of the page increases from 2sec to 10sec (no plack,<br>
measured with Firebug > network tab)<br>
<br>
On catalogue/<a href="http://search.pl" target="_blank">search.pl</a>, 1800 calls, from 6sec to 6.5s<br>
<br>
On authorities/<a href="http://authorities.pl?breedingid=186&authtypecode=CORPO_NAME&authid=0" target="_blank">authorities.pl?breedingid=186&authtypecode=CORPO_NAME&authid=0</a><br>
(From bug 15715), 64k calls (!!!) from ~10sec to ~4min<br>
<br>
On cataloguing/<a href="http://addbiblio.pl?biblionumber=1" target="_blank">addbiblio.pl?biblionumber=1</a>, 13k calls, from 3sec to 9sec<br>
<br>
Do not take these measures too strictly, but they give an idea of the issue...<br>
<br>
So I don't see a lot of methods to fix that:<br>
1/ Revert and abandon 13618<br>
2/ Understand how it's possible to have 60k calls to display a form<br>
and try to improve these areas<br>
3/ Profile Template::Stash::AutoEscaping to know if we cannot optimise<br>
what it does<br>
4/ Any brilliant ideas?<br>
<br>
Jonathan<br>
<br>
<a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15715" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15715</a><br>
<a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13618" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13618</a><br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Koha-devel@lists.koha-community.org')">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Koha-devel@lists.koha-community.org')">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote><br><br>-- <br>Sent from Gmail Mobile<br>