fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-02-10 04:29 am

[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 [personal profile] fu.

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 =
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org