Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Major performance issue when viewing the Inbox


Cristian
Participant

@crosescu

Also there is no need to run these two queries one after the other

SELECT sender_id FROM {$bp->messages->table_name_messages} WHERE id

SELECT * FROM {$bp->messages->table_name_messages} WHERE id

You only need to execute the second query and the number of queries that hit the database will be decreased a little bit

No need for this line $this->last_sender_id = messages_get_message_sender( $this->last_message_id ) in BP_Messages_Thread::populate()

Instead add the line below after “if ( $last_message ) {“

$this->last_sender_id = $last_message->sender_id;

Skip to toolbar