Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#347 Slow page loading with the 'tables-filter' plugin enabled

3.7.0
open
nobody
None
5
2014-09-16
2013-11-22
vladimir
No
Our project has over 250 tables. Because of slow working 'lang' function this loop take ~5 sec:
foreach ($tables as $table => $type) {
    echo '<span><\a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table) . ">" . lang('select') . "</a> ";
    echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' . bold($_GET["table"] == $table) . ">" . h($table) . "</a><br></span>\n";
}
after small changes it work much more faster:
$select = lang('select');
foreach ($tables as $table => $type) {
    echo '<span><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table) . ">" . $select . "</a> ";
    echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' . bold($_GET["table"] == $table) . ">" . h($table) . "</a><br></span>\n";
}

Discussion

  • vladimir
    vladimir
    2013-11-22

    patch attached

     
    Attachments