Thread: Forum Display Enhancements - vB Enterprise Translator
View Single Post
  #669  
Old 10-01-2009, 11:45 PM
KrisP KrisP is offline
 
Join Date: Jun 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have run wget -b -O /dev/null -i detest2.txt -o links.txt and I can see in links.txt:

Quote:
--02:22:53-- http://www.myforum.org/showthread.ph...53&language=de
Connecting to www.myforum.org|xx.xx.xx.xxx|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/dev/null'

0K .......... .......... ........ 450M=0s
also I have installed datastore on forum.

If I copy/paste a link from links.txt it takes a long time to load - then if I paste same link second time in another browser it loads fast.

Shouldnt the link from links.txt load fast the first time after running wget ?

another problem: if I manually run : that yields:

Quote:
Connecting to www.myforum.org|xx.xx.xx.xxx|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `showthread.php?t=3172'

[ <=> ] 29,128 --.-K/s in 0s

03:46:35 (130 MB/s) - `showthread.php?t=3172' saved [29128]
Still it dosent get cached - takes long time to load ...

Quote:
Originally Posted by imported_silkroad View Post
Many of you might have a busy site (like us) and things can slow down during your peak traffic times. Or, you just might want to speed up serving your translated pages, regardless of the speed of translation across the net, by pre-fetching your translations and populating your dB cache.

We do this very simply, and manually, during off-peak times using the urllist.txt file generated by vBSEO, as follows (linux wget example):

(1) Copy the ./data/urllist.txt file to something like ja.txt (we will use Japanese as an example here).

(2) Simply use either vi or sed (or your favorite tool) to append ?language=ja (or whatever language you use) to the end of each URL. Example: %s/$/?language=ja/

(3) Optional: Remove the posts and index URLs if you want to focus on showthreads and tags, etc. This step is optional, and can be easily done with grep.

(4) Run this command in the same directory:

Code:
wget -b -O /dev/null -i ja.txt -o links.txt -U your_site_wget_ja
Basically, wget will run in the background (-b), send the output to /dev/null, and GET every URL in the ja.txt (-i), send the output to (optional) links.txt (-o) and then to track your progress in the log files (optional) you can specify a string for your user agent (-U).

Also, you can add the wait (-w) option in wget if you need it, but we run this off peak, so nevermind.

I found using wget against a modified version of urllist.txt works great to prefetch translations

This is very and you can easily run it on your (linux) server. Enjoy
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01380 seconds
  • Memory Usage 1,784KB
  • 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)bbcode_code
  • (4)bbcode_quote
  • (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