Membership 2 Media protection slowing the website.

After enabling the Media protection, we noticed a slow on our website, mainly in loading the files: images and other assets.

This is a gtmetrix test with Media protection enabled https://gtmetrix.com/reports/encs.eu/HWzEEgPm

And this is without it: https://gtmetrix.com/reports/encs.eu/PebZopf7

  • Bernadette
    • WPMU DEV Initiate

    I’ve also noticed that adding more Membership types to a users makes their page speed load significantly worse the more you add. So i’m unsure whether this is solely the media protection or a mixture of that and the membership 2 pro plugin together.

  • Katya Tsihotska
    • Support & QA

    Hi Bernadette

    Hope you're having a wonderful day!

    Membership 2 plugin has an option which can speed up the plugin performance. This option allows caching Membership queries for faster results. Enabling this option will cache results for 12 hours.

    To enable it, go to the Membership 2 -> Settings -> General section and turn on the "Speed Up Results" option.

    Let me know if it doesn't help.

    KInd regards,

    Katya

  • Bernadette
    • WPMU DEV Initiate

    Hi

    I responded on email but hasnt shown up here so sending again:

    Thanks for the suggestion. We’ve applied that caching option but the site speed has not changed. We’re still looking at around 30s for the pages to load when viewing as a member.

    If you could take a closer look that would be great, as at the moment, the plugin is making the site unusable.

    Thank you for the help

  • Katya Tsihotska
    • Support & QA

    Hi Bernadette

    Hope you're fine today!

    The email you've received is just an automatic notification email, but all replies should be done on the forum thread.

    I've consulted with our developers, they are aware of some performance issues with Membership 2 Pro and they are already working on improving this in future releases. But unfortunately, at the moment there is no other option in Membership, except the one suggested above, which allows improving its performance.

    I can suggest making some improvements in optimization to make the site faster.

    1. I've noticed a warning at the Hummingbird -> Caching -> Page Caching section. It looks like you have another caching plugin/tool on your site. It's not recommended to use few caching plugins/tools with the same caching type at the same time as they can cause conflicts and slowness as a result. I would recommend you to deactivate all other caching plugins or deactivate Hummingbird Page Caching.

    2. Set up minification. First of all, go to the Hummingbird -> Minification page and enable advanced mode

    Then, I would recommend you to Minify and Combine as many files as possible. After this, I would recommend you to enable Inline or Footer option for as many CSS files as possible and enable Footer or Defer option for as many JS files as possible.

    The most important thing when working with Advanced mode and making changes to how your site loads files, is that you test things out after every single change. It is not recommended to select all your files, click on Bulk Update, and enable all of the options at once. This could have disastrous consequences for your site, and break a lot of things! Please do not do this!

    You won’t be able to apply every option to every file, so it is very important to test as you go. (and make sure to click on Save Changes and then purge the cache).

    3. I also recommend to clean and optimize your database a bit. You can use the following plugin:

    https://wordpress.org/plugins/wp-sweep/

    But I strongly recommend creating a backup of the database before doing any changes.

    Hope this will help to improve the situation while our developers are working on the plugin performance.

    Kind regards,

    Katya

  • Bernadette
    • WPMU DEV Initiate

    Hi there

    Applying these other suggestion will likely be a drop in the ocean compared to the additional loading times the Membership 2 pro plugin creates. I’ve also noticed that the ‘speed up results’ options breaks assignment of memberships to users.

    I’ve also noticed that whilst page speeds arent lighting fast still, they are significantly faster when membership 2 pro is active but the media protection add on is disabled. It seems to therefore predominately be the media protection causing the slow site speeds.

    There must be something you can do to rectify these page speeds with the media protection active.

    Failing that, we will need WPMU, at the very least to suggest an alternative solution / plugin / custom code that supplies the same functionality asap. We have invested a lot of time and resources building a portal on the understanding that this premium plugin would work. With the impact on site speeds, WPMU is supplying and charging for a plugin which is not fit for purpose without any prior warning, even though the issue is apparently known to you.

    Please let me know how you can resolve this situation.

    Thanks

  • Katya Tsihotska
    • Support & QA

    Hi Bernadette

    Trust you had a great day!

    I sincerely apologize for the disappointing and the inconvenience this is causing you.

    I’ve flagged here our developers so they can have a closer look, give their valuable feedback and describe the scenario why it works like this. Please note, the developer’s response is much slower compared to the usual staff.

    I still strongly recommend you to do implement improvements suggested in my previous post, as this could improve the performance anyway.

    I also tried to find an alternative solution, but I wasn’t able to find a free membership plugin which allows protection of media uploads. Most of the free plugins support only posts/pages protection.

    I’ve also noticed that the ‘speed up results’ options breaks assignment of memberships to users.

    As I already mentioned, this option caches Membership queries for 12 hours, so some changes couldn’t have an immediate effect. Could you please describe in few words how can I replicate the issue so I’ll check this on my test install?

    Can we schedule a call as the one on your contact page does not work

    I’m afraid that we do not provide support by a phone. Could you please send me the link to the page which doesn’t work for you so we’ll check this and if there is an issue we’ll sort it out.

    Kind regards,

    Katya

  • Paul Kevin
    • Neo

    Hey there Bernadette ,

    Hope you are well today. Media protection is like a firewall for your media files. There have to be checks before loading the protected media to ensure that the correct content is shown to the correct user with the right permissions. These checks do take time especially if the data to verify is a lot. In this case the number of item to protect, the number of subscribers to check and the number of memberships available.

    The speed of Media protection has increased in the recent versions as you can see in this post https://premium.wpmudev.org/forums/topic/membership-2-loading-time and we are working on enhancing the performance of the plugin in the next upcoming version.

    Warm Regards

    Paul Kevin

  • Bernadette
    • WPMU DEV Initiate

    Hi Paul

    This is more concerning than first thought having read that thread. I don’t see in there that the performance of the media protection has improved much since a few people have flagged it back in June. I was also told this issue was not known ahead of our subscription to WPMU (Sept 2017), which is clearly not the case. There have been no warnings of the implications of using this plugin in regards to site speed at any point since this issue has been flagged.

    A modification is referenced in that thread that links to this google sheet: https://docs.google.com/spreadsheets/d/1_WxIOEMOThm6z_KvywbPFrW5jSQGA6hsSPJ7nILxiB4/edit#gid=0

    Please can you let me know if this modification is active on our site encs.eu and ensure everything to do with the media protection plugin is working currently? The ‘speed up results’ option doesn’t seem to be working. Can you check results are being cached correctly without messing up the memberships?

    We are currently see page load times of around 15seconds. This is higher than what the other users have quoted so please can WPMU check this thoroughly on our site.

    Thanks

  • Paul Kevin
    • Neo

    Hey there Bernadette ,

    Hope you are well and sorry for the late response on this. The Membership cache setting improves the database checks and saves a cache of this data for 12 hours. For media protection it works the same though the speed optimizations does depend on the data and this has been improved since the last few releases. The performance changes will not be noticed immediately until a few page refreshes are done.

    We are currently working on improvements for the next version that re-writes how media protection works to focus on efficiency and performance. I will provide you with a tested beta version once I have it working well.

    Warm Regards

    Paul Kevin

  • Bernadette
    • WPMU DEV Initiate

    Hi Kevin

    Thanks for your response. Please can you let me know some timescales for the tested beta version?

    Also, the cache feature is not working correctly on the site. It is messes up the memberships. In our instance it is applying 'Assembly' and 'Portal' named memberships to all users when active. I have attached a screenshot of this. Please check the features of the plugin are working correctly for our site specifically as there seem to be issues.

    Thanks,

  • Paul Kevin
    • Neo

    Hey there Bernadette ,

    Hope you are well and sorry for the late response on this. Right now I do not have a definite date but I can say in the next 7 days, as I am also working on a better cache setting that allows you to define what to cache and what to exclude. There are also some fixes especially in membership protection rules that should help speed up checks for access to content.

    Warm Regards

    Paul Kevin

  • Paul Kevin
    • Neo

    Hey there Bernadette ,

    Hope you are well today. Kindly try the attached beta. This beta is not with QA yet as there are still many tasks to e fixed but it should improve media loading. The media checks are cached by default, though if you have alot of rules and memberships, it might take some time to effect.

    Another improvement I am working on is checking the rules, hence this next release might take some time to pass :slight_smile:

    Warm Regards

    Paul Kevin

  • Bernadette
    • WPMU DEV Initiate

    Hi Paul

    Apologies for the delay in getting back to you and thanks for getting back to me with the beta version. I will implement this on a dev site and get back to you with the results.

    Please can you let me know timescales for the next full release? Important we know that information.

    Many thanks,

    Ed

  • Bernadette
    • WPMU DEV Initiate

    Hi there

    I just want to check in on the full update to improve the media protection speed issues? It’s been over 3 weeks now and I’m aware a new update is available but want to check if this specific issue has been addressed as part of it?

    Many thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.