Skip to Content Skip to Menu

[#6658] Activity - Notification Icon slowing down user profile view

7 years 4 months ago - 7 years 4 months ago #294499 by davidmarshall15
Hi,

When a user views there own profile, there is a noticeable delay in the page loading and this is due to the target user id being concatenated in the asset column.
My activity table is still quite small, under 10k rows and I expect it to grow, so this concerns me.

Please consider moving the target user id out of the asset column and create a new indexed column for it.

Thanks
David
Last edit: 7 years 4 months ago by krileon. Reason: Added [#6658] tag to subject

Please Log in or Create an account to join the conversation.

7 years 4 months ago #294500 by davidmarshall15
I should add, I have been generating notifications, the current count is low:
Code:
select count(*) from modc_comprofiler_plugin_activity where asset like 'notification.%'; +----------+ | count(*) | +----------+ | 2555 | +----------+ 1 row in set (0.01 sec)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago - 7 years 4 months ago #294512 by krileon
The activity queries were tested against a table with 100,000 rows. They all performed perfectly fine taking less than 50ms. As the asset does not begin with a wildcard it can be indexed perfectly fine and does so in my tests. There is no concat of the user id. There is a concat done for the read check and during CB Gallery access check.

Will review the performance further, but you're basically using a feature that's not entirely done as I haven't decided if I want to make a new table for notifications or keep them in activity; it's creating some optimization problems as you've noticed.

forge.joomlapolis.com/issues/6658


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 7 years 4 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago #294513 by krileon
Ok, put some thought into my previous reply. I'm going to split notifications into their own database table to help optimize it further. This would remove the need of "notification.USER_ID." prefixing the asset (a column will be added to designate the recipient user). Read table will also be removed entirely as we'll just track read state in the notification table it self. I'll add migration to migrate existing notification activity to the new table so nothing to worry about in that regard.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: davidmarshall15

Please Log in or Create an account to join the conversation.

7 years 4 months ago #294525 by davidmarshall15
Sounds great, I will be watching out for the change as I will have some Auto Actions to update.

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago #294527 by krileon
Won't be for awhile as I'm working through other plugins before coming back to CB Activity and CB Auto Actions. You can continue to use it as is and should have migration in place when the change is made so all your existing usages can migrate.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: davidmarshall15

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum