Greetings!

Thanks to help from Alan, David and Emile, we finally got the
performance problems
tracked down and fixed.

Upgrading to CVS version of Midgard 1.4.1, PHP4 and Nadmin M3 didn't
help.

However, what helped was changing the snippet / hklc_adminsite_host /
argv0 / browse / browse_authors to the following:


<?
  
  $tpl->define_dynamic(  "authorblk" , "authortpl"  );

      $tpl->assign( array( 

        // HARDCODED ID AND NAME VALUES, FIXME
        authkey => urlencode(5), 
        authvalue =>  htmlspecialchars('Stonesoft Content Manager'),
        authselected => $isselected
      )); 
      $tpl->parse(THEAUTHORS, ".authorblk");    
    $tpl->parse($bitstoset[$i], "authortpl");
    $tpl->clear("authortpl");
    $tpl->clear("authorblk");
   $tpl->clear(THEAUTHORS);
?>

This prevents Nadmin from doing a mgd_get_person to all person entries
in database when generating the Article Edit page. While not a problem
in Midgard databases where you only have person entries for content
contributors, in this case it was a problem. 

Our client has hundreds of person entries. This caused the generation of 
the Article Edit page to be almost 2Mb in SQL queries. When we removed
the mgd_get_person calls, this dropped to about 10Kb.

However, it is understandable why Nadmin used these calls, as
mgd_list_persons
doesn't provide sitegroup attributes. A better fix to the problem would
be changing the function in Midgard-PHP.

/Bergie

PS. Thanks to everybody involved in the effort, this helped us to
avoid a rather nasty PR disaster.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to