[dw-free] optimize viewing entries with large # of comments
[commit: http://hg.dwscoalition.org/dw-free/rev/3902f52fa21e]
http://bugs.dwscoalition.org/show_bug.cgi?id=4315
Add comment warning future coders against trying to make the code pretty.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4315
Add comment warning future coders against trying to make the code pretty.
Patch by
Files modified:
- cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r 064d26890498 -r 3902f52fa21e cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm Fri Feb 10 03:54:52 2012 +0000
+++ b/cgi-bin/LJ/Talk.pm Fri Feb 10 12:28:11 2012 +0800
@@ -739,6 +739,7 @@
# find all singletons that LJ::Comment knows about, then grep for the ones we've set in
# this get_talk_data call (ones for this userid / nodeid)
+ # note: This is a heavily-used path. The hash lookup on nodeid is a deliberate optimization
my $uid = $u->userid;
LJ::Comment->preload_rows();
my @comments_for_entry =
--------------------------------------------------------------------------------
