madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23074: LJSUP-13883: Journal pages optimizaiton ...

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/ljrelation.pl
Modified: trunk/cgi-bin/ljrelation.pl
===================================================================
--- trunk/cgi-bin/ljrelation.pl	2012-10-09 12:29:54 UTC (rev 23073)
+++ trunk/cgi-bin/ljrelation.pl	2012-10-09 12:37:04 UTC (rev 23074)
@@ -57,21 +57,16 @@
     &nodb;
 
     # get user and journal ids
-    my $u = shift;
-    my $uid = LJ::want_userid($u);
+    my $uid = LJ::want_userid(shift);
     my $jid = LJ::want_userid(shift);
     return 1 unless $uid && $jid;
 
     # for speed: common case is non-community posting and replies
     # in own journal.  avoid db hit.
     return 0 if ($uid == $jid);
-
-    return $u->{'__cached_relation'}->{$jid}
-        if $u->{'__cached_relation'}->{$jid};
-
+    
     # edge from journal -> user
-    my $relation = LJ::check_rel($jid, $uid, 'B');
-    return $relation
+    return LJ::check_rel($jid, $uid, 'B');
 }
 
 sub get_groupmask

Tags: livejournal, madeon, pl, 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