See #523064: Display tags in thread list which does this already for tags

Advantages:
- Does not require different queries for PostgreSQL and MySQL
- Should be faster since we can define how many users should be loaded
- Allows to sort and limit the participant list (Example use case: Show author that wrote the last message instead)

Comments

walker2238’s picture

Any updates on this?

berdir’s picture

Status: I tried to get this working, turned out to be more complex than I thought. I actually wasn't able to get it working correctly ;)

Question: Why are you asking? #956378: Simplify and clean up the /messages list page will probably include an option to exclude yourself from the Participants list (Will even be the default, I think)

walker2238’s picture

I'm asking because I believe I created an issue in regards to being able to get the sender of the message. Anyways it was over a year ago and I saw this issue so I figured it was most likely on the back burner.

If I recall correctly, there is no way to find the sender of the last message in the participants thread.

berdir’s picture

Version: » 6.x-2.x-dev
StatusFileSize
new12.62 KB

Attaching a first, proof of concept patch.

Notes:
- All tests pass
- Currently, participants are ordered by their id. I don't know yet if it possible to do anything else.
- A very basic performance test with disabled sql cache showed that this is a bit faster (~11,5req/s vs. 10req/s). I need to do more testing with a bigger database and a user that has more messages.

berdir’s picture

Status: Active » Needs review
berdir’s picture

#4: load_participants_separate.patch queued for re-testing.

berdir’s picture

I played around with this, but wasn't that successfull, the new separate query is actually slower than the current list query.

Not sure how to proceed here, this will most likely have to wait until pm_thread is in. Maybe we can add a pm_thread_participants table, listing all participants of a thread, the problem there is that we only want to show participants which actually sent a message to you.

berdir’s picture

StatusFileSize
new14.24 KB

Work in progress patch, will probably fail some tests.

Status: Needs review » Needs work

The last submitted patch, working_on_this.patch, failed testing.

oadaeh’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.