ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

?ACT=saef is REALLY slow

November 08, 2010 8:28am

Subscribe [4]
  • #1 / Nov 08, 2010 8:28am

    Triad

    44 posts

    Its taking 15 seconds to build up a SAEF!

    As an added bonus, adding use_live_url=no and include_jquery=no has NO effect.

    If someone can point me in the direction of the module that answers the ACT=saef, i can have a rummage and try to diagnose the issue, but im actually stumped trying to find the offending code!

  • #2 / Nov 08, 2010 9:07am

    Rob Sanchez

    335 posts

    +1

  • #3 / Nov 08, 2010 9:58am

    Triad

    44 posts

    Ok.

    expressionengine/libraries/Actions.php

    Line 115 seems to be the offender.

    However, you’ll like this…. send some hypertext first, eg

    echo " ";

    right before

    $query = $EE->db->get('modules');

    and this speeds up the execution HUGELY.

  • #4 / Nov 08, 2010 10:19am

    Triad

    44 posts

    Lol, brilliant.

    If you

    echo " ";

    ANYWHERE in the EE_Actions() function, it runs faster.

  • #5 / Nov 08, 2010 10:21am

    Triad

    44 posts

    Traced further to line 195.

    The

    saef_filebrowser method is the cause.

    Now onto why.

  • #6 / Nov 08, 2010 10:35am

    Triad

    44 posts

    mod.channel_standalone.php > function saef_javascript()

    LOOKS like its the culprit, using microtime() to time output.

  • #7 / Nov 08, 2010 10:47am

    Triad

    44 posts

    Microtime shows me some interesting results, completely not what id expect type results.

    Start : 0.52700300 1289226825

    End : 0.52835700 1289226825

    Which is obviously, really fast.

    Getting to the point of total bafflement.

  • #8 / Nov 08, 2010 10:49am

    Triad

    44 posts

    The faulty code:

    Script: mod.channel_standalone.php 
    Line: 1348 
    Code: $this->EE->output->set_header('Content-Length: '.strlen($output));

    What you’d do to speed it up? Dunno.

    Ditch it, its faster without it.

  • #9 / Nov 08, 2010 12:16pm

    Triad

    44 posts

    Additional thoughts:

    Doing an echo caused automatic headers to be sent by apache.

    I ruled out strlen() being slow, by manually setting the content length, the script was no faster.

    With the header, its slow. Without it, its fast. Why? Not a scooby doo.

    @sweetl80 (steve.sweetland ee user account)

  • #10 / Nov 09, 2010 4:11am

    John Henry Donovan

    12339 posts

    Triad,

    Thanks for your testing I am pinging the devs on this one.

    Can you tell me the version and build of EE you are using and whether you are using any add-ons?
    What sort of environment are you hosted on?

  • #11 / Nov 09, 2010 12:07pm

    Triad

    44 posts

    Ubuntu LAMP setup…

    We’re using build 20100712.

    Thanks for the heads up, will keep an eye on this post.

    Sidenote: Is there any way i can get permissions for my own account to post in here, rather than posting as my employer?

  • #12 / Nov 09, 2010 2:49pm

    Brandon Jones

    5500 posts

    Triad,

    Can you please perform a version update and see if there’s any change?

    To get a support credit, please email .(JavaScript must be enabled to view this email address) with the license number of the site you’re working on and your username. Thanks.

  • #13 / Dec 08, 2010 4:05pm

    Rob Sanchez

    335 posts

    I did some more extensive research into this problem and create a new bug report here: https://support.ellislab.com/bugs/detail/14720/

  • #14 / Dec 09, 2010 11:13am

    Sue Crocker

    26054 posts

    Rob, thanks for posting the bug report. Let’s see what the dev team has to say about it.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases