MantisBT: master bc08b197

Author Committer Branch Timestamp Parent
Julian Fitzell master 2003-02-19 05:20 master cddfcdfc
Changeset

Well, we're down from 8000+ queries to 167, which is pretty good. I think I can get it lower but I need to sleep now.

In fact, I'm not even really using the cache yet for the big savings. I just had to use existing code project_get_all_userrows() instead of the crappy SQL that was in the print* functions.

  • config_defaults_inc.php
    (private_project_threshold): access level to get into private projects

  • core/access_api.php
    (access_cache_matrix_project): new; cache access levels for all users for
    the project
    (access_cache_matrix_user): new; cache access levels for all projects for
    the user
    (access_has_project_level): call access_get_local_level() instead of a
    function in the project_api
    (access_get_local_level): get the access level of a user on a project

  • core/print_api.php
    (print_reporter_option_list):
    (print_handler_option_list):
    use project_get_all_user_rows() to reduce the number of queries made

  • core/project_api.php
    (project_get_all_user_rows): provide a second parameter that limits the
    returned rows to users above a certain access level

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1941 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9

mod - core/access_api.php Diff File
mod - config_defaults_inc.php Diff File
mod - core/project_api.php Diff File
mod - core/print_api.php Diff File
mod - doc/ChangeLog Diff File