• Resolved Hugo1177

    (@hugo1177)


    I just have installed your Plugin at another site.

    The performance of your plugin measured with P3 plugin profiler could be better!!!

    I guess you are wasting to much time in the bashboard. One can check that by installing Plugin Logic and ruling out your plugin for Dashboard and activating it only on \wp-admin\

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    Hi Hugo and thanks for your feedback. I really appreciate it!

    That’s interesting. I will check what P3 suggests and if anything can be done better then why not? πŸ™‚

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    In order to understand the performances of WP MyBackup dashboard I had to compare its performance metrics against some other plug-ins.
    One candidate was WooCommerce, which has a rich dashboard with many tabs/subtabs and the other one was BackupWPup, which has a similar dashboard like WP MyBackup.

    The tests consist of a simple walk-through the dashboard settings tabs/pages, no action executed (like create an order, create a backup job, run a backup job or something like that). I didn’t wanted to compare their execution performances but their dashboard loading performances.
    One exception from the above was that on the first two tests I run an action (on each plug-in) that “checked the installation”, which basically queries the PHP/WordPress configuration. In the third tests this action was not executed anymore because I wanted to see exclusively the dashboard navigation performances without any extra-functionality.

    Below is a Profile Report generated by P3, one for each different test:

    WordPress Plugin Profile Report (test #1)

    • Theme name: Storefront
    • Pages browsed: 90
    • Avg. load time: 0.7712 sec
    • Number of plugins: 5
    • Plugin impact: 65.49% of load time
    • Avg. plugin time: 0.5051 sec
    • Avg. core time: 0.2006 sec
    • Avg. theme time: 0.0209 sec
    • Avg. mem usage: 46.70 MB
    • Avg. ticks: 11,499
    • Avg. db queries : 34.00
    • Margin of error : 0.0447 sec

    Plugin list:
    – P3 (Plugin Performance Profiler) – 0.0028 sec – 0.55%
    – BackWPup – 0.1339 sec – 26.51%
    – WooCommerce – 0.1787 sec – 35.38%
    – Wp Mycarousel – 0.0036 sec – 0.72%
    – Wpmybackup – 0.1861 sec – 36.85%

    WordPress Plugin Profile Report (test #2)

    • Theme name: Storefront
    • Pages browsed: 99
    • Avg. load time: 0.7290 sec
    • Number of plugins: 5
    • Plugin impact: 61.78% of load time
    • Avg. plugin time: 0.4504 sec
    • Avg. core time: 0.2134 sec
    • Avg. theme time: 0.0207 sec
    • Avg. mem usage: 46.68 MB
    • Avg. ticks: 11,572
    • Avg. db queries : 35.46
    • Margin of error : 0.0444 sec

    Plugin list:

    – P3 (Plugin Performance Profiler) – 0.0027 sec – 0.60%
    – BackWPup – 0.1335 sec – 29.64%
    – WooCommerce – 0.1792 sec – 39.79%
    – Wp Mycarousel – 0.0035 sec – 0.77%
    – Wpmybackup – 0.1315 sec – 29.21%

    WordPress Plugin Profile Report (test #3)

    • Theme name: Storefront
    • Pages browsed: 87
    • Avg. load time: 0.6540 sec
    • Number of plugins: 5
    • Plugin impact: 60.24% of load time
    • Avg. plugin time: 0.3940 sec
    • Avg. core time: 0.1945 sec
    • Avg. theme time: 0.0207 sec
    • Avg. mem usage: 46.45 MB
    • Avg. ticks: 11,340
    • Avg. db queries : 33.10
    • Margin of error : 0.0448 sec

    Plugin list:

    – P3 (Plugin Performance Profiler) – 0.0028 sec – 0.72%
    – BackWPup – 0.1254 sec – 31.82%
    – WooCommerce – 0.1582 sec – 40.16%
    – Wp Mycarousel – 0.0033 sec – 0.85%
    – Wpmybackup – 0.1042 sec – 26.46%

    Analysis

    We see that all tested plug-ins scored quite the same, their runtime is around the 30%, which means an average of 0.1 -0.2 seconds.
    WooCommerce has a bit higher runtime than the other two, perhaps it involves many database queries which increase the total runtime.
    On the other hand the WP MyBackup and the BackWPup (which both have a similar dashboard and a similar functionality – they backup the WordPress data) have a very close runtime with an average 30.84% for the WP MyBackup and respectively 29.3% for BackWPup.

    Obviously we don’t expect to have an exact match because any of these plug-ins queries different amount of data and present different amount of output so a small deviation from a standard is somehow expected. Needless to say that their performance is also directly impacted by the available system resources (while testing plug-in A the overall system resources might be busier than while testing plug-in B). Obviously the P3 cannot handle this level of refinements due the fact that being a PHP process – which is isolated by itself – it cannot monitor the local OS resources at that level.
    Conclusion
    The bottom line is that their performances, as you have said, could be better. And yes, this general assertion applies to any plug-in or software out there. However, I couldn’t find something extraordinary about the performances of WPMyBackup dashboard comparing with some other plug-ins.

    What do you mean by “The performance of your plugin measured with P3 plugin profiler could be better!!!” ? Can you suggest something that I could take into consideration by doing an in-depth analysis?

    Anyway, I want you to thank you for your interest in this topic because it helped me in gathering this useful information.

    Thread Starter Hugo1177

    (@hugo1177)

    Compare it with UpdraftPlus. This Plugin takes several actions to reduce unnecessary server load.

    Here is my check:
    BackUpWordPress – 0.0464 sec – 8.05%
    BackWPup – 0.0232 sec – 4.02%
    UpdraftPlus – Backup/Restore – 0.0071 sec – 1.24%
    Wp Mybackup – 0.2960 sec – 51.39%

    Here your Plugin is permanently over each other plugin. And there a two really ugly peeks caused by your plugin. One on a Blog-Page and the bigger one at wp-admin/plugins.php

    PS. Do you know these Plugins:
    P3 Custom Scanner (only on Github!)
    Heartbeat Control
    Plugin Logic
    With these Plugins one can customize P3 and take influence on the wordpress Heardbeat and the Dashboard performance.

    Maybe one can try to set DISABLE_WP_CRON to true in wp-config.php for the P3 test

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    What did you profiled? (a) The dashboard interface or (b) the backup task?
    Because this is important. A test case would be helpful, I mean, I could use the steps you made in order to understand what is the difference.

    In my tests, as shown above, the difference was minimal.

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    Hi Hugo,

    I still don’t understand how you come up with the above numbers.

    I did the following test: I just started a P3 profile scan and let it work for about 10 minutes then stopped. Meanwhile I did not touched the WP admin interface, I was just curious what is going to happen. This is the result:

    • P3 (Plugin Performance Profiler) – 0.0029 sec – 2.56%
    • BackWPup – 0.0554 sec – 48.71%
    • UpdraftPlus – Backup/Restore – 0.0220 sec – 19.36%
    • Wpmybackup – 0.0334 sec – 29.37%

    Obviously if we make 1000 different profiles (which is the statistically recommended way) we might get 1000 different results.

    I am still confused about how did you got those figures πŸ™‚

    Thread Starter Hugo1177

    (@hugo1177)

    I’va made a Auto Test!

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    Hi Hugo,

    Very interesting topic πŸ™‚

    I just created a video (https://youtu.be/Jlm2OnBNpHM) about my test where I used the recommended P3 Customizer together with the P3 Scanner.

    On the P3 Customizer I’ve added the Settings page link for each of the three plug-ins.
    On the P3 Scanner I just run an automatic scan.
    Test #1:

    1. add the settings page link for WP MyBackup
    2. the same for BackWPup
    3. the link of Edit BackWPup job
    4. finally the settings page link for UpdraftPlus

    Note: the reason behind adding additionally the Edit Job link for BackWPup was that its default dashboard does not include the job settings like the WP MyBackup or UpdraftPlus contain.

    When the profile finished is gave me the following results:

    • P3 (Plugin Performance Profiler) – 0.0046 sec – 1.91%
    • BackWPup – 0.1060 sec – 43.69%
    • UpdraftPlus – Backup/Restore – 0.0634 sec – 26.12%
    • Wpmybackup – 0.0686 sec – 28.27%

    Test #2: the same like test #1 above BUT without (3). The test result:

    • P3 (Plugin Performance Profiler) – 0.0063 sec – 2.25%
    • BackWPup – 0.1003 sec – 35.76%
    • UpdraftPlus – Backup/Restore – 0.0870 sec – 31.01%
    • Wpmybackup – 0.0869 sec – 30.98%

    Test #3: the same like test #1 above BUT without (2). The test result:

    • P3 (Plugin Performance Profiler) – 0.0059 sec – 2.27%
    • BackWPup – 0.0981 sec – 38.12%
    • UpdraftPlus – Backup/Restore – 0.0715 sec – 27.79%
    • Wpmybackup – 0.0818 sec – 31.81%

    Conclusion: within a small deviation from their mean value all of these three plug-ins show a similar usage in resources.

    I would be very grateful if you can compile a test case that can be replicated on other systems (eg. my system) which describes in detail what you’ve done and what result you’ve received. Your results and my results (documented in the video I made public) are quite different and I eagerly want to find out where the bottleneck is (if there is any) and obviously to fix it.

    Anyway, thanks again for your feedback, as always, any feedback is welcome.

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    Hi Hugo,

    After several tests I think I spotted the problem: it seems that when /wp-admin/admin-ajax.php?query is called by no-matter-who my plug-in intercepts that call and, depending on the query, it tries to do one thing or another which obviously fail. This one thing or another may consume resources which normally should not be used and thus it increases the plug-in resource usage.

    I wasn’t able to spot this issue until I have customize P3 in several ways, with several custom links, etc. So I noticed that in fact there are other plug-ins which call the /wp-admin/admin-ajax.php that leads to accidentally triggering of my WP MyBackup.

    Anyway, I just want to thank you for your incident report, it was a useful one, although it took me some time to get probably the same result as you.

    I will address this issue in the next release, so expect to find it fixed!

    Best regards,
    Eugen

    Thread Starter Hugo1177

    (@hugo1177)

    /wp-admin/admin-ajax.php is the so called WordPress-Heardbeat normally running all 15 seconds.

    Plugin Author Eugen Mihailescu

    (@eugenmihailescu)

    You are right: Heartbeat is one of the many things the admin-ajax.php does. Additionally the admin-ajax.php script will load the WP bootstrap, administration API, WP Core’s Ajax handlers. Each of these will load other WP scripts which may trigger many other actions/filters.

    If your plugin listens any/some of these WP actions/filters then obviously the plug-in will use some resources when the hook(s) gets executed. If the above hooks fire several times and your plug-in should, for instance, listen/execute only in one particular situation (eg. on dashboard page only), then the unnecessary spent time is multiplied such that 0.5s could mean in real-life even 5s.

    Anyway I fixed the issue, thanks to your incident report.

    Now, during the normal Heartbeat, the WP MyBackup uses only 31% (0.035s) where the UpdraftPlus takes 18% (0.021s), BackWPup 47% (0.054s) and the WP Core takes the rest (4%).

    So 0.035s(after) vs 0.296s(before) is 8.5 times better. Not bad. Could be better? Yes, but it requires some refactoring which I will schedule for January release.

    Again, thank you for your report & feedback.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘performace’ is closed to new replies.