Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-21-2004, 04:17 AM
jeremycs jeremycs is offline
 
Join Date: Jul 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How are smileys parsed? -- I want to use 1000+ on a big board... bad idea?

I tried a similar post @ Vbulletin.com but it hasn't gotten very informative replies yet....

If we are displaying 50 posts per page, will having 1000+ smileys slow Vb down considerably?

I haven't looked at how Vb parses for smileys, but I imagine this could be a bad thing to do depending on how the smilley parsing works.

If tokens trigger replacements then I guess it wouldn't be too bad, but if it is looping over the text looking for 1000+ tokens to replace text with... this would probably not be a good thing.

Does anyone here know how it works offhand?
Reply With Quote
  #2  
Old 08-21-2004, 04:23 AM
jeremycs jeremycs is offline
 
Join Date: Jul 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I doubt it works like this....

But by "tokens triggering replacement"... I mean, you could have a :::3colontrigger for all EXTENDED smileys, extended being, ones that aren't commonly used in normal conversations like :P etc etc... no big deal to have 10 or 20 of those common smileys looped over and replaced (which may be how Vb parses smileys by default?)

But maybe you could get away having tons more smileys on the system if you used a trigger that someone wouldn't normally type... like three colons followed by the smiley name.

When people post a new message, you could put a filter in there that would count (and limit) the number of smiley triggers allowed (including your extended 3 colon trigger smileys) -- to prevent people from attacking the board by making a bunch of repetitive :::3colon tokens with random text.

Make sense?
Reply With Quote
  #3  
Old 08-21-2004, 10:45 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

50 posts per page and 1000 smilies in the DB? Hmmm... I would be interested in the timing numbers with and without smilies enabled.

A couple of points about how it is done:
  • Remember that no overhead is required if the post is coming out of the post cache.
  • Once per page load the smilies are loaded from a cache, so that looping over the DB entries is not required.
  • The work of doing the replacements is a loop that calls preg_replace for every smilie you have defined (50 in your case) -- a simple, but not efficient design.
Reply With Quote
  #4  
Old 08-21-2004, 11:17 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it should be ok since all parsed posts are placed postparsed table in the db which contains posts already parsed thus not having to run the bbcodeparse_2() function the only considerable loading times i may think is the strain of getting 50 posts perpage and the loading times for some users due to their connection speed
Reply With Quote
  #5  
Old 08-21-2004, 11:32 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<i>all parsed posts are placed postparsed </i>

Just so we do not mislead the inquirer, 'cause I know you know AN, the post cache can only be so large, therefore only the recent N posts will be in the cache.

Good point about 50 posts per page. vB pages are huge even for a small number of posts.
Reply With Quote
  #6  
Old 08-21-2004, 11:48 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would advise at least dropping that number to 25 per page, thats is about how far I will set mine. If a user wants to read more they can always go to the next page, no point in adding extra processing time to the page if a user is only intrested in the first few posts.

Less posts per page also means the html sent to the browser will be much smaller, resulting in a quicker display of the page.
Reply With Quote
  #7  
Old 08-21-2004, 12:09 PM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In linear mode, this thread, which had 6 posts in it before this reply, was a page of about 54k. Displaying only the first post (1 post/page) is still 37k. The HTML for the single post content is only 693 characters and the HTML for the single postbit is about 4k. This is without the style sheet being inline (sent per page) pe vb.org AdminCP setting.

Folks often focus on server speed, which is very important for a busy site, but for most other sites, concentrating on page size can be just as important.

Bandwidth tips:
- style sheet not inline
- avoid threaded mode
- if you do use threaded, set cache size very small
- set default per page to 10
Reply With Quote
  #8  
Old 08-21-2004, 07:49 PM
jeremycs jeremycs is offline
 
Join Date: Jul 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CarCdr
In linear mode, this thread, which had 6 posts in it before this reply, was a page of about 54k. Displaying only the first post (1 post/page) is still 37k. The HTML for the single post content is only 693 characters and the HTML for the single postbit is about 4k. This is without the style sheet being inline (sent per page) pe vb.org AdminCP setting.

Folks often focus on server speed, which is very important for a busy site, but for most other sites, concentrating on page size can be just as important.

Bandwidth tips:
- style sheet not inline
- avoid threaded mode
- if you do use threaded, set cache size very small
- set default per page to 10

I wont be using threaded mode... and I'm a portered 2.x style / legacy
postbit kinda guy

These 3.x styles are way too H E A V Y imo. They do look nice, but on long
pages the scrolling time from top to bottom is like 3 times longer than 2.x w/legacy postbit.

I'll feel good knowing I'm saving my members from early tendonitis :P
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03733 seconds
  • Memory Usage 2,227KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete