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-14 01:54 pm

[dw-free] optimize viewing entries with large # of comments

[commit: http://hg.dwscoalition.org/dw-free/rev/6121fc84a811]

http://bugs.dwscoalition.org/show_bug.cgi?id=4315

When we set _loaded_text back to false, make sure we also add this comment
back to the list of unloaded text singletons (we don't appear to go down
this path for anything user-facing at the moment, as we always set both
when editing comments but better safe than sorry)

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Comment.pm
--------------------------------------------------------------------------------
diff -r 5be268e0a765 -r 6121fc84a811 cgi-bin/LJ/Comment.pm
--- a/cgi-bin/LJ/Comment.pm	Tue Feb 14 21:49:52 2012 +0800
+++ b/cgi-bin/LJ/Comment.pm	Tue Feb 14 21:54:25 2012 +0800
@@ -602,6 +602,7 @@
     } else {
         $self->{$_} = undef foreach qw(subject body);
         $self->{_loaded_text} = 0;
+        push @unloaded_text_singletons, $self;
     }
     # otherwise _loaded_text=0 and we won't do any optimizations
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

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