• Can you give me a little insight into what is going on in this section of code?

        if(count(get_plugins())>0){
            foreach (get_plugins() as $key => $value) {
                $plugin = get_plugin_data(WP_PLUGIN_DIR.'/'.$key);
                if(!empty($plugin['AMP'])){//$plugin['AMP']
    				$imageUrl = '';
    				if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR.$value['TextDomain'].'/screenshot.png')){
    					$imageUrl = plugins_url($value['TextDomain'].'/screenshot.png');
    				}
                    $themeDesign[] = array(
                            'demo_link' => $plugin['AMP Demo'],
    			'upgreade'=>true,
    			'title'=>$plugin['AMP'],
    			'value'=>$value['TextDomain'],
    			'alt'=>$plugin['AMP'],
    			'img'=>$imageUrl,
    								);
                }
            }

    I’m a server admin so I can only make some sense of it, but I do know it is causing a serious slow down in the loading of articles if they have to be created outside of cache.

    • This topic was modified 8 years, 3 months ago by clarter.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hi

    I am performance oriented person so I love whenever we’re able to improve the performance and the one that you are suggesting is seems like a big improvement.

    How were you able to track?

    I have created a ticket for this: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/1799

    We will personally resolve this in the next update but when we will be working on this, we will need your help in troubleshooting and testing. It would be great if you could join our Beta channel (Telegram) of the plugin: https://t.me/joinchat/Cs48IBMOgaBoaqGPvZhG9w

    Looking forward to hearing from you.

    Thread Starter clarter

    (@clarter)

    Thanks Ahmed, I check Github and our developers mentioned that seemed to be what they would do to fix the issue, but weren’t 100% what was being accomplished by that section so they preferred that I raise an issue with you guys.

    I found the problem using Dynatrace. I noticed that once the plugin was enabled our server response times degraded significantly and Dynatrace allows me to track back to specific method hotspots and this is what it pointed out.

    I’d be glad to help out with testing whenever you’re ready.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hi @clarter

    Dynatrace looks great! Please let me know if you find any other improvements related to our plugin. We will adapt to it and do the performance tweaking as much as possible.

    I would recommend you to join our beta testing from https://t.me/joinchat/Cs48IBMOgaBoaqGPvZhG9w

    Thanks again, You can also send us a Pull request https://github.com/ahmedkaludi/accelerated-mobile-pages/pulls

    Hello @clarter

    Any chance you could share how your developers thought they would fix this?

    I recently had a problem with my site getting slowed way down using this plugin and I’m wondering your solution might also help with my problem?

    Thread Starter clarter

    (@clarter)

    @mxdwn, we incorporated their code fix from the PR at https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/1799 and it helped tremendously.

    I’m tracking another slowdown on the creation of articles now, but the one I opened this ticket for was causing problems with even with code not directly tied to the articles.

    Rats. I checked and that change is in my source version of the plugin. Drat. So that didn’t fix my problem. My problem is that my site has a ton of content over 10 years or so, and the moment I turn the plugin on, it causes some kind of weird splintering with threads on my server. Literally within 30 seconds the site gets overwhelmed with threads and I can only keep rebooting the OS. Can’t seem to find why it’s so incompatible with my server…..

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hi @clarter

    When you find any performance issues, please get in touch with us at https://ampforwp.com/support/

    I take performance and security very seriously and my aim for 2018 is to make this plugin light as the feather and secure as a shield.

    @mxdwn
    Oh that’s not good at all. I’m very sorry for that.

    Can you go through the error logs and see if you find any issues. or something that is related to server performance, then please let me know. I will see how we can adapt to it.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Slow section of code?’ is closed to new replies.