Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1U trunk/cgi-bin/LJ/S2/RecentPage.pm U trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/LJ/S2/RecentPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/RecentPage.pm 2012-10-10 13:54:47 UTC (rev 23095) +++ trunk/cgi-bin/LJ/S2/RecentPage.pm 2012-10-10 13:58:10 UTC (rev 23096) @@ -137,9 +137,13 @@ next unless $_->{'posterid'} != $u->{'userid'}; $apu{$_->{'posterid'}} = undef; } + + # + # prefetch userpic infomation and userids + # if (%apu) { - LJ::MemCacheProxy::get_multi( map { $_, "upicinf:$_" } keys %apu ); - LJ::MemCacheProxy::get_multi( map { $_, "upiccom:$_" } keys %apu ); + LJ::MemCacheProxy::get_multi( map { [$_, "upicinf:$_"] } keys %apu ); + LJ::MemCacheProxy::get_multi( map { [$_, "upiccom:$_"] } keys %apu ); LJ::load_userids_multiple([map { $_, \$apu{$_} } keys %apu], [$u]); $apu_lite{$_} = UserLite($apu{$_}) foreach keys %apu; } Modified: trunk/cgi-bin/cleanhtml.pl =================================================================== --- trunk/cgi-bin/cleanhtml.pl 2012-10-10 13:54:47 UTC (rev 23095) +++ trunk/cgi-bin/cleanhtml.pl 2012-10-10 13:58:10 UTC (rev 23096) @@ -661,7 +661,7 @@ my $clean_res = eval { my $cleantag = $tag; $cleantag =~ s/^.*://s; - $cleantag =~ s/[^\w]//g; + $cleantag =~ s/[^\w]//go; no strict 'subs'; my $meth = "CLEAN_$cleantag"; my $seq = $token->[3]; # attribute names, listref @@ -960,7 +960,7 @@ # IE sucks: my $nowhite = $hash->{$attr}; - $nowhite =~ s/[\s\x0b]+//g; + $nowhite =~ s/[\s\x0b]+//go; if ($nowhite =~ /(?:jscript|livescript|javascript|vbscript|about):/ix) { delete $hash->{$attr}; next; @@ -1684,7 +1684,7 @@ # after the <table> was closed) causing unnecessary problems if (ref $opts->{'autoclose'} eq "ARRAY") { foreach my $tag (@{$opts->{'autoclose'}}) { - next if $tag =~ /^(?:tr|td|th|tbody|thead|tfoot|li)$/; + next if $tag =~ /^(?:tr|td|th|tbody|thead|tfoot|li)$/o; if ($opencount{$tag}) { $newdata .= "</$tag>" x $opencount{$tag}; }