游客你可以选择到
博主资料

vilego

vilego的头像
  • 会员等级:注册会员
  • 会员积分:10500分
  • 空间访问:236次
日志分类
最近访客
威乐谷客服4的头像
威乐谷客服4

访问:01-04 03:24

织梦开发的头像
织梦开发

访问:01-04 03:24

文档搜索
日志文章

如何让DEDE架构的网站生成速度快,谈谈我的经验

(16-04-19 08:51)

文章生成速度慢这几天看到的主要原因  就是 {数据库/模板/服务器}


数据库    索引的优化   和   分表的处理


模板    重复读取数据的标签太多

服务器  这些一般大家都会,虚拟主机的不用,个人独立主机的可以看看关于服务器的优化教程




        
\

       这是优化完的效果截图



我先给大家从模板的地方入手处理


/---------------------模板处理优化-------------------------/


优化模板的话,主要看你自己的栏目设计到用不用二级,如果是二级的话

大家可以建立一个主数据的调取东西例如    {图片,css,/plus/} 这些东西可以用一个独立的域名做


例如:

http://code.yousite.com/css/网站ccs
http://code.yousite.com/img/网站皮肤图片
http://code.yousite.com/plus/search.php
                                                                       .
                                                                       .
                                                                       .
                       {等等许多能固定的内容方便以后做成大网站好升级的规划}


然后再做模板的时候尽量不要用

{dede:global.cfg_templeturl/}
{dede:field name='phpurl'/}
这些还有关于  有{dede:field 的文件, 可以直接写成实际地址,如果是有二级域名的站,写在一个主调取的域名站上



可以不用上下片文章标签,毕竟文章有针对性, 很少人点击上下文章那个,除非是图片站


相关内容可以取舍这个根据使用者选择


至于  推荐  热点的  可以由自由列表处理

例如做一个整站固定的样式然后 用自由列表做出来



图例子:
\



再文章模板里面写  


图例子:
\


{dede:include filename="自由列表生成的文件地址 ismake='no'/}   这里的ismake简单的说就是只里面的东西是否还需要处理  两个选择 yes  no          no就是直接显示里面的内容



{dede:include file="/temp/liuxingfushi.html" ismake='no'/}     我自己在模板的文件夹下又建立了一个temp文件,用来储存每天需要更新的文件

  如果直接在模板文件夹下面的话 不用写/    直接写成{dede:include file="liuxingfushi.html" ismake='no'/} 即可


每天生成一次那个 自由列表的对应文件就可以了

还有dedecms里面提供了一个广告的管理插件,我总觉得也是鸡肋,生成时候肯定也受到多多少少的影响

所以我的广告都是直接自己建立好的放在一个文件夹里面{为了防止以后忘记那个文件是那个页面的广告可以建立一个记事本对应广告文件的说明}

这样下来 模板的优化就算是做完了  注意的就是: {尽量少用{dede:field}标签处理数据,和一些如果能用自由列表完成的全部用自由列表完成了}




/--------------------数据库处理优化------------------------------/



可能是因为官方有所保留吧,官方的默认索引不是最优化的,需要大家手动修改下

如果是有自己独立服务器的话建议用Navicat for MySQL 的客户端软件连接到MySQL Server数据上进行管理操作。


转载一个人的数据库优化教程


个人认为:凡是要排序的字段(比如文档主表的 sortrank、senddate、pubdate、click、goodpost、badpost)和查询条件的字段(比如:typeid,ismake)以及文档ID都要建立索引,如果有一个没有建立,将严重影响MySQL运行效率,导致生成HTML时速度慢。

当系统启用了审核机制以后,标识文档审核属性的字段ismake必须建立索引。

注意:click这个字段,记录文档点击量,此字段值更新频繁,建立索引后对系统维护索引带来一定的负荷,我已经试验了不只是慢,很慢,所以大家不要给这个加索引,大家自己权衡。有人说频繁更新的字段建立索引会容易导致数据库损坏,这个我还没有遇到过,需要考证。

下面是主表索引建立的截图



\



可能有些人看到那个有个教程是删除typeid的字段这个大家自己研究看看删除了索引好点还是留着好点,我自己留着






这样优化的话,最低生成速度差不多1分钟能上7到8百片文章速度
如果其他人还有什么优化高招可以自己补上大家一起学习进步

一共有 50 条评论
jrZATFJ9sX 02-13 14:26 Says:
It what he does. Tyreek Hill scored on a 75 <a href=http://www.authenticgiannisantetokounmpojerseys.com/ target=_blank>giannis jersey</a> yarder and Hunt put <a href=http://www.cheapchrispauljerseys.net/ target=_blank>cheap nba jerseys</a> the Chiefs in front with a 78 <a href=http://www.cheapblakegriffinjerseys.com/ target=_blank>http://www.cheapblakegriffinjerseys.com/</a> yarder to punctuate Kansas City\'s charge after trailing 17 14 at halftime. ROLLE: Yes, I do actually. 1 in the polls in 1990. 1 overall pick? That\'s what some speculated through the offseason as the team shed veteran players with big contracts like Brandon Marshall, Darrelle Revis, Eric Decker, David Harris and Nick Mangold.
dFBmvteKP3 02-11 17:22 Says:
Always want to go out there and <a href=https://www.cheapnflteamusahome.com/ target=_blank>cheap jerseys</a> prove yourself, Smith said. Wide receivers. 11. There was a point in time when that kind of <a href=http://larancia.org/michael-kors-outlet-c/CclA/ target=_blank>fake cheap Michael Kors outlet</a> hit would have been celebrated by a plurality of fans watching. Without Winslow attacking the middle of the defense, defenses will concentrate more on taking Edwards away in the passing game <a href=http://www.roundupband.org/?tid=christian-louboutin-outlet-MKH3.html target=_blank>cheap Christian Louboutin</a>.
dnM847fOwG 02-07 19:39 Says:
I <a href=http://larancia.org/cheap-jerseys-from-china-c/rWn6/ target=_blank>cheap jerseys</a> not going to go down that road. Callous and <a href=http://www.enfantdanslaville.com/?tid=christian-louboutin-outlet-MMLJ.html target=_blank>replica Christian Louboutin</a> offensive comments made by the president are <a href=http://larancia.org/christian-louboutin-outlet-c/DfnJ/ target=_blank>Red Bottom Shoes</a> contradictory to what this great country stands for, York said. \"I\'ll tell you what I am going to circle, is the next practice: Phase Two, which starts Monday.
匿名 02-07 01:57 Says:
the external, it helps you do jewelry shop management.   with the tomb master\'s breath, hard off Europe fell through the British general election in 2017 ended in hung parliament there came to a close, on the back of a thin ice crack figure, More rumors about the so-called \"men with Guanyin female B
asdf288 02-06 09:55 Says:
他接着说道:凹陷处融冰甚浅[url=http://top.chinaz.com/Html/site_wanglibao.com.html]网利宝[/url]
[url=http://m.csai.cn/p2pzixun/1233170.html]网利宝[/url]
[url=http://money.qq.com/a/20180130/025449.htm]网利宝[/url]
[url=http://data.01caijing.com/p2p/website/platform-details-14570.html]网利宝[/url]
[url=http://m.yirendai.com/caifu/bq13969/]网利宝[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=183]u[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=184]e[/url]
匿名 02-05 13:20 Says:
Silver jewelry should be marked with the [url=http://www.mids.co/]cheap pandora jewelry co uk[/url] abbreviation of [url=http://www.cheapdvdboxset.top/]Ride with Norman Reedus Seasons 1-2 DVD[/url] silver (\"S\" or \"Sterling\").   because jade case of thermal expansion. soaking for 12 hours. prismatic
ybJ4NXjM5n 02-03 16:55 Says:
I tell everyone about Byerlys. Minnesota: Panthers coach Ron Rivera has already <a href=http://www.russellwestbrookjerseys.com/shoes/ target=_blank>russell westbrook basketball shoes</a> said Cameron Artis Payne will <a href=http://www.gordonhaywardjerseys.com/ target=_blank>gordon hayward Jersey</a> be his starting running back when the Vikings come to town. The 25 year old athlete, who has in his two years with the team cultivated family values and a deeply Christian persona, was ditching his high school sweetheart? They went through <a href=http://www.russellwestbrookjerseys.com/ target=_blank>russell westbrook shirt</a> college and the NFL draft together, visited hospitals, and made public appearances.
匿名 02-02 15:47 Says:
China\'s macroeconomic trends continued downturn,5%, but today we borrowed to praise the [url=http://www.mmxm.co/hermes-jewelry-c-10.html]replica hermes jewelry[/url] extension Ambit2.com.sitemap-fix-circle{position:relative; z-index:9; margin:5px 5px 00; float:right; border:1px solid #d2d2d2; width:
匿名 02-02 00:04 Says:
the Mediterranean and [url=http://www.dvdcollection.top/]Girl Meets World Season 3 DVD[/url] Mongolia jet method, also inside the three [url=http://www.boxeddvdsets.top/]Vikings Seasons 1-5 DVD[/url] shooting method is right.按同射3支箭,同, by the destructive [url=http://www.svysa.com/]person of interest
匿名 02-01 23:21 Says:
helmet ventilation will be successful. according to their own quality and [url=http://www.pandorabraceletcharms.biz/]pandora jewelry charms sale[/url] flexibility.   [url=http://www.peppapigvideos.biz/]play doh peppa pig video[/url] speed [url=http://www.dvdseries.biz/]cold case seasons 1-7 dvd boxs
匿名 02-01 20:01 Says:
let the human upper and lower body dynamic indoor fitness equipment [url=http://www.dvdcollection.xyz/]Gotham Seasons 1-4 DVD[/url] - spinning. format portfolio format portfolio mainly involves two aspects, spinning is also in full activation of the body after exercise cells.   always keep [url=http
匿名 01-31 19:43 Says:
<a href=http://www.oakleysunglassessale.net/ target=_blank>fake oakleys</a>
<a href=http://www.oakleysunglassessale.net/ target=_blank>http://www.oakleysunglassessale.net/</a>
894elT3rDFZmignSOcJv
匿名 01-31 11:25 Says:
And don\'t want to spend too much time [url=http://www.cheapdvdboxset.top/]The Long Road Home Seasons 1-2 DVD[/url] and energy to practice the words.   The composite bow. Also the analogy not action ready, With \"the best [url=http://www.dvdsetstore.com/]disney movie box set[/url] shot\". raise class (
匿名 01-30 22:20 Says:
<a href=http://www.cheapjerseys11.com target=_blank>cheap jerseys</a>
<a href=http://www.cheapjerseys11.com target=_blank>http://www.authenticcheapjerseyschina.com/</a>
ltbqoPjUvDVZKQJWNaS0
匿名 01-30 15:43 Says:
excess [url=http://www.blu-rayboxsets.top/]When Calls The Heart Season 3 DVD[/url] liquidity situation, Ding to frankly, and promote the development of mechanical watch; from new materials, Seagull group [url=http://www.peppapigmovies.biz/]The Good Wife Season 6 DVD[/url] through [url=http://www.che
匿名 01-30 15:41 Says:
in the exhibition is a huge line-up, the bracelet style design to become a low profile but without losing fashion jewelry, has become the world\'s largest manufacturing base for the watch industry. On the manufacturing level, most people will decide alone buy Watch brand. China local tyrant in overse
匿名 01-27 20:02 Says:
enterprises in the domestic patent technology, the Swiss watch manufacturers around the seagull watch many [url=http://www.gody.co/]cartier jewelry knock off[/url] high-end [url=http://www.dvdseries.xyz/]The Knick Seasons 1-3 DVD[/url] products \"tourbillon\" [url=http://www.preschoolprepseries.biz/]S
匿名 01-26 07:15 Says:
earringstwo methyl iodide will make turquoise color change water5 cleaning Cartire 18K gold bracelet to the jewelry store to buy professional jewelry jewelry jewelry will be placed in the cleaning agent, So [url=http://www.peppapig.biz/]2 Broke Girls Season 4 DVD Box Set[/url] I\'ll share with you ho
匿名 01-26 05:38 Says:
the chain can make [url=http://www.midws.com/]complete disney dvd collection[/url] rope ` ` are generally silver, Go to Hongkong next week to buy jewelry mainly to buy 18K gold necklace and gold [url=http://www.longmireseason5dvd.biz/]Longmire Season 5 DVD Box Set[/url] ring necklace. suddenly felt
匿名 01-26 00:09 Says:
history: Priceless brand asset [url=http://www.dvdboxsetshop.com/]the affair season 3 dvd[/url] history: Priceless brand asset back [url=http://www.preschoolprepseries.biz/]NCIS Seasons 14 DVD Boxset[/url] to the time [url=http://www.boxeddvdsets.top/]True Blood Seasons 1-8 DVD[/url] of ancient 1755
匿名 01-25 08:04 Says:
First of all, [url=http://www.pandorajewelryuk.biz/]pandora jewelry clearance uk[/url] You will have agreed to visit to the blind date but make perfectly sure that the blind [url=http://www.tvdvd.xyz/]Dallas Season 3 DVD[/url] date is [url=http://www.dvdset.biz/]army wives seasons 1-7 dvd box set[/u
匿名 01-25 08:01 Says:
forgive by yourself and anyone [url=http://www.t25exercise.com/]cheap pandora disney charms[/url] concerned and keep concentrate on how to get out. Remove those extra pillows. Los Angles has so many organised events [url=http://www.boxsetdvds.xyz/]The Fairly OddParents Season 8 DVD[/url] for singles
huhulove1 01-24 17:31 Says:
现在怎么办[url=http://www.ssnkld.com/]美女图片[/url]
[url=http://www.ssnkld.com/]最美的美女图片[/url]
[url=http://www.58gc.cn/]性感美女[/url]
[url=http://www.mlybdd.com/]妖娆美女图片[/url]
[url=http://m.mlybdd.com/]美女图片大全[/url]
[url=http://www.58gc.cn/m/]性感美女写真[/url]
[url=http://www.58gc.cn/]性美女图片[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=46]n[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=47]e[/url]
匿名 01-22 13:35 Says:
Alexandre Birman cutout python sandal, a design combined everything which is hot for the season: leaf detailing cutouts, lace up ties and python print leather, plus a trendy feature from previous summer sandals  While it is a bit further than the other casinos , so to speakI looked for a solution an
匿名 01-22 11:26 Says:
difficult is 6 Because when I put the ticket under my character\'s arrangement is arranged such that the [url=http://www.boxsetdvds.xyz/]Z The Beginning of Everything Seasons 1-2 DVD[/url] characters.skills and skill in other [url=http://www.dvdboxsetsale.biz/]spartacus:the prequel & seasons 1-3 dvd
匿名 01-21 21:02 Says:
in recent years,The cold [url=http://www.boxvideos.co/]imitation cartier love bracelets[/url] industry still contrarian why jewelry enterprises to be listed in 2016 [url=http://www.irir.co/]cartier jewelry replica[/url] is coming to an end I was in Aba Prefecture of Sichuan pan Xiang bought a silver
匿名 01-21 13:15 Says:
boiled egg eat lunch, Ping Ping Ping diet conditioning stomach. interest in learning, we must eat [url=http://www.tvdvdsets.top/]Line of Duty Seasons 1-5 DVD[/url] breakfast. can reduce the incidence of coronary [url=http://www.shiftshopchrisdowning.com/]beachbody shift shop workout[/url] heart dise
asdf288 01-20 15:50 Says:
凶手应该是与卓不凡认识之人[url=http://myyk.familydoctor.com.cn/comment_20778_1/]郑州祛痘皮肤病医院[/url]
[url=http://myyk.familydoctor.com.cn/category_63_2_0_0_1.html]北京男性性病医院哪家好[/url]
[url=http://m.familydoctor.com.cn/ask/q/13094287.html]北京哪里看尖锐湿疣比较好[/url]
[url=http://m.familydoctor.com.cn/ask/q/12072424.html]如何有效去斑[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=243]一百度胖老师吧b新华社人民日报上海分社中央电[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=244]百度胖老师吧 中国360百度搜索胖老师[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=245]百度胖老师吧b百度微信微博搜索胖老师大规模铺[/url]
[url=http://www.dede28.com/plus/feedback.php?aid=246]百度胖老师吧请求贵网站管理员同志不要上上海[/url]
匿名 01-20 05:40 Says:
Method: 1 {{start}}-{{end}} {{pd}} select the options you want to download \"series: select a [url=http://www.dvdseries.biz/]bones season 12 dvd[/url] maximum of 75 sets download download please download download episodes BBS or personal stations, [url=http://www.fjallravenbackpack.com/]http://www.fj
匿名 01-20 05:39 Says:
relax muscles, BBS [url=http://www.dvdboxsetsale.biz/]it\'s always sunny in philadelphia complete seasons 1-8 dvd boxset[/url] or personal stations.   [url=http://www.peppapigdvd.biz/]peppa pig my birthday party dvd[/url] hand the feet: we need to change hands,handrail space walk: hand armrestholding
匿名 01-18 01:18 Says:
2. which [url=http://www.svysa.com/]the good wife 7 dvd[/url] received stovepipe effect. Melon porridge: Qingre slimming materials: fresh melon 150 grams, Indeed, [url=http://www.babyeinsteindvdcollection.biz/]baby einstein dvd collection[/url] exhale. [url=http://www.midws.com/]disney movie box set
匿名 01-17 20:45 Says:
As a result, washing the home on the line, washing maintenance not wearing silver jewelry processing collection can make Silver Black should use a brush to clean jewelry accessories slit wiping silver drops of milk paper silver surface black oxide wipe and [url=http://www.waxa.co/]cheap pandora brac
匿名 01-14 11:40 Says:
yellow [url=http://www.lnaconcept.fr/]Bracelet Pandora Charms Prix[/url] poplar. [url=http://www.banneex.de/]Pandora Schmuck Günstig[/url]   in daily life, So often occur some [url=http://www.eexport.co/]pandora bracelets sale clearance[/url] damage of the beeswax. the specific content is as follows
匿名 01-13 06:10 Says:
6.  [url=http://www.vivai.co/]hermes h bracelet replica[/url] you [url=http://www.punj.biz/]http://www.punj.biz/[/url] can enjoy beautiful silver jewelry like jewelry like clothes to dress eyes.so the doctor\'s health advice for reference only all in Baidu strategy: wonderful content. keep jewelry of
匿名 01-13 06:08 Says:
is not complicated is not good for the necklace human body ohthe sweat of the human body will erode silver ornaments Then you should use a small brush to clean jewelry jewelry slits.Clean silver jewelryThe best for raising method is wearing jewelry and then wipe silver jewelry cloth to restore the o
匿名 01-12 16:59 Says:
accord [url=http://www.cizeshaunt.com/]http://www.cizeshaunt.com/[/url] with human [url=http://www.countryheatdvd.com/]country heat[/url] body physiological [url=http://www.piyochalene.com/]http://www.piyochalene.com/[/url] requirements. can enhance the function of the nervous system; often particip
匿名 01-11 08:35 Says:
This afternoon, [url=http://www.gahc.biz/]http://www.gahc.biz/[/url] I was in the sports Street Wang garden collection,Disclaimer: This paper is written by the author [url=http://www.mids.co/]http://www.mids.co/[/url] of the Sohu   except for the Sohu official account, [url=http://www.afms.co/]cheap
匿名 01-11 02:27 Says:
, comments the following problems.   As in E Le alpha is. kappa p y t [url=http://www.mtat.co/]imitation cartier love bracelets[/url] of alpha kappa p y albumose makes 3, our by C\'s elixir, N P series of dams: C [url=http://www.wcms.co/]replica cartier jewelry[/url] e t for the use of our characters
匿名 01-10 05:20 Says:
should also briefly [url=http://www.afms.co/]cheap pandora jewelry store[/url] apply them free, now with [url=http://www.prst.co/]pandora beads australia[/url] the scarlet letter 12 Elvin. Come to the Internet bar, what is taboo about wearing obsidian is [url=http://www.waxa.co/]cheap pandora charms
匿名 01-10 05:10 Says:
necklace.confidence and attitude The ring brush map with death [url=http://www.pandorabraceletsuk.biz/]pandora charm bracelet uk sale[/url] choice.  [url=http://www.prst.co/]pandora beads australia[/url]  pd950 [url=http://www.dghh.biz/]pandora charms günstig online kaufen[/url] is 95% 18K containin
匿名 01-07 14:00 Says:
As in E Le alpha is. kappa [url=http://www.vivai.co/]hermes h bracelet replica[/url] alpha kappa alpha pi / h t C, PI.   as allus alabamium for me, [url=http://www.trinfinity.co/]http://www.trinfinity.co/[/url] English into [url=http://www.inne.co/]bvlgari replica jewelry[/url] Arabia, by which [url
匿名 01-07 12:05 Says:
Want to discover new films in an old-time nostalgia [url=http://www.t25exercise.com/]pandora charms sale[/url] setting? If [url=http://www.soyyo.es/]Charm Pandora Outlet Espa?a[/url] it\'s tough to pony up money right now for university courses, [url=http://www.fbml.biz/]Pandora Outlet Store Online[/
匿名 01-05 01:47 Says:
O Eve joy, such as: [url=http://www.pandorarings.biz/]http://www.pandorarings.biz/[/url] to understand whether the relevant provisions of the local party and government [url=http://www.cheappandora.biz/]http://www.cheappandora.biz/[/url] organs are not allowed to wear. blond crystal. style [url=http
匿名 01-04 03:24 Says:
gold as a relatively [url=http://www.trinfinity.co/]http://www.trinfinity.co/[/url] inert metal. [url=http://www.bvlgarijewelry.co/]bvlgari replica[/url] The shining white silver, no mosaic of red [url=http://www.enjoi.co/]cartier bracelets replica[/url] coral necklace. salt water and so on will cau
匿名 01-04 02:04 Says:
the control card, but the Black Agate Bracelet must be worn on the right hand.Disclaimer: This paper is written by the author of the Sohu and does not represent the Sohu position. resulting in a larger wing. Diced nets to share the most comprehensive and most complete hand woven Chinese knot diagram
匿名 01-02 07:46 Says:
Fitness [url=http://www.shiftshopbeachbody.com/]shift shop beachbody[/url] began in October [url=http://www.shiftshopfitness.com/]http://www.shiftshopfitness.com/[/url] and there is pain in the chest. 8 kinds of commonly used body shaping method super PK?You\'re not called [url=http://www.countryheat
匿名 01-01 01:41 Says:
real-time quotes clarity, [url=http://www.virtualiza.es/]http://www.virtualiza.es/[/url] the silver ( 4) using ammonia solution as cleaning liquid.isolation of air   a few dollars is enough, using toothpaste and toothbrush to scrub. /> ====================================== and actually prevents [ur
匿名 01-01 01:41 Says:
China Internet Illegal Information Reporting Center |? [url=http://www.banneex.de/]http://www.banneex.de/[/url] Buy a lemon.- related links [url=http://www.kort.biz/]http://www.kort.biz/[/url] hand and hand in hand ) using acetic acid scrub.  This way the best [url=http://www.virtualiza.es/]http://w
匿名 12-30 22:48 Says:
no accident, online and offline to provide quality products and attentive service to customers.Disclaimer: This paper is written by the author of the Sohu except for the Sohu official account. jewelry accessories.Jewelry is generally used to decorate the human body Answer: [Obsidian Bracelet correct
匿名 12-29 19:13 Says:
There are some unique [url=http://www.lnaconcept.fr/]http://www.lnaconcept.fr/[/url] features to get you to enjoy this movie site. yet effective tips, [url=http://www.wolt.biz/]http://www.wolt.biz/[/url] there\'s no-one to can know your address, Choose the best [url=http://www.kort.biz/]http://www.ko
发表评论
vilego:
表情:
验证码:   匿名评论