View Single Post
  #63  
Old 08-04-2004, 10:54 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would be interested to hear from folks who run with a large number of attachments (more than 2,000) to give me some feedback on timing. Please PM me if you are willing to test the new version. Thank you.

Changes queued-up for version 2.1
  1. New Query performance improved.
    Performance for sites with many attachments is significantly improved. The
    single most time consuming aspect of the script is the MySQL query for
    'COUNT(*)' to get the number of attachments matching the selection criteria
    and access permissions. By including only those JOIN's that are required,
    depending on the columns being accessed, the ORDER BY, and the WHERE clauses,
    we improve performance of both retrievals. There is still one case where
    the row retrieval could be slow: when the user requests that the output be
    sorted by forum title.
  2. New Added usergroup access checking.
    Two variables can be used to either (a) allow access to a set of usergroup
    or (b) disallow access for a set og usergroup id's. To set permissions,
    find the line containing "// Usergroup permissions:" and read the detailed
    instructions.
  3. New List attachments added since last visit.
    The new URL parameter "getnew=1" will list attachments added since your last
    visit. Examples for links you could set up:
    attachment_browser.php?getnew=1
    attachment_browser.php?getnew=1&sel_forumid=8,13
  4. New Added debugging setting for timing.
    Specify "debug_queries=1" in the URL to get timing information for the page.
  5. Change The default for the second-level sort is "none".
    This provides a small performance increase when the user does not want
    a second-level sort. Also, we changed the sorter not to try a second-level
    sort if the first-level sort is by attached time stamp.
  6. Fix Include forums that are not active.
    These are accessible if URL is know, so just make normal forum
    access checks.
----------------
ps: If the 'COUNT(*)' retrieval is just too slow to support sites with many thousands of attachments, then we will need an option to skip getting the count. Note that the query to get 'COUNT(*)' is not as simple as you might think. As a minimum (not incuding special search values from the Display Options form), it must deal with forum permissions, attachment 'visible', as well as check the post table for 'visible' and post deletions.

With such an option enabled, the page would not include the number of accessible/matching attachments and would not have normal page navigation. For the page navigation, since we do not know how many there are, the best we could do is support "Next Page" when we know that there is *at least one* more attachment not on the current page.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01464 seconds
  • Memory Usage 1,772KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete