cmgmyr/laravel-messenger

High CPU usage

ozgursoy opened this issue ยท 3 comments

public function scopeUnreadForUser(Builder $query, $userId)

Thanks for package but, this query is some kind of nightmare for SQL, If you have millions of messages and user, the app will be fucked up. We can't use this query without caching.

public function scopeUnreadForUser(Builder $query, $userId)

Thanks for package but, this query is some kind of nightmare for SQL, If you have millions of messages and user, the app will be fucked up. We can't use this query without caching.

Don't bother using this package for real life apps. Take a look at $thread->creator()->name for example, your queries will duplicate to the sky if you have only 200 messages. Not to mention unread .. etc. Sorry guys but it is !

Thanks for the feedback. I realize there needs to be some performance improvements to the package. I haven't had the time lately to work through them. I'm sure with moving forward with the latest Laravel versions we could utilize newer features as well. Always happy to take a look at PRs ๐Ÿ™‚

Thanks for the feedback. I realize there needs to be some performance improvements to the package. I haven't had the time lately to work through them. I'm sure with moving forward with the latest Laravel versions we could utilize newer features as well. Always happy to take a look at PRs ๐Ÿ™‚

@cmgmyr Thank you. :)