madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22697: LJSUP-13301: Main page optimization

Committer: sbelyaev
LJSUP-13301: Main page optimization
U   trunk/cgi-bin/LJ/Comment.pm
Modified: trunk/cgi-bin/LJ/Comment.pm
===================================================================
--- trunk/cgi-bin/LJ/Comment.pm	2012-08-20 09:06:07 UTC (rev 22696)
+++ trunk/cgi-bin/LJ/Comment.pm	2012-08-20 09:22:41 UTC (rev 22697)
@@ -384,7 +384,10 @@
 
 # returns LJ::User object for the poster of this entry, or undef for anonymous
 sub poster {
-    LJ::load_userid($_[0]->posterid);
+    return $_[0]->{'poster_obj'} if exists $_[0]->{'poster_obj'};
+    my $poster = LJ::load_userid($_[0]->posterid);
+    $_[0]->{'poster_obj'} = $poster;
+    return $poster;
 }
 
 sub posterid {

Tags: livejournal, madeon, pm, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments