Split-off from #444440: privatemsg_message_load_multiple() (nice id, btw ;) )
Implement static cache for thread_load...
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | privatemsg_thread_static_port.patch | 2.94 KB | berdir |
| #6 | privatemsg.thread_static_nesting.patch | 3.75 KB | naheemsays |
| #5 | privatemsg.thread_static_early_return.patch | 1.87 KB | berdir |
| #5 | privatemsg.thread_static_nesting.patch | 3.19 KB | berdir |
| #4 | privatemsg.thread_static2.patch | 3.31 KB | litwol |
Comments
Comment #1
litwol commentedCan we instead port d7 drupal_static with pmsg namespace function name? does it fit the use case ?
Comment #2
berdirc/p from IRC:
Also, if we need static reset, we would need to copy two functions.
Comment #3
naheemsays commentedTested and this works as expected.
Comment #4
litwol commentedLittle code nitpick.
Please reivew.
Comment #5
berdircomparison of the two approaches..
Note that I did remove the isset() check at the end, that is not necessary as you check at the beginning and always add something.
Comment #6
naheemsays commentedreroll of the static_nesting patch since I assume that is the approach that is preferred over the early return?
There is a slight change in code too - in the last there was
I changed that to
This is not really a big patch - the majority of line changes are in indentation due to being inside another if statement - compare it to early return patch in the previous comment to see how small the functional changes really are.
Comment #7
berdirDoes work correctly and this was RTBC before, just hasn't been commited yet. This is quite an important performance improvement, so lets get this in.
Comment #8
litwol commentedComment #9
litwol commentedComment #10
berdirStraight re-roll for D7, no functional changes except incorparating the small change to privatemsg.module from #576366: D7 Port of pm_email_notify and pm_user_block
Comment #11
litwol commented