花纯春
净心编程 http://www.123de6.cn
posts - 177,  comments - 92,  trackbacks - 0
关于DNN的性能增强,转自http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/486/Default.aspx
作者:Charles Nurse (DNN核心团队成员)
Many people have commented that the dotnetnuke.com site is a little slower with the recent upgrade to 4.3.1 (especially for Login).

If your site has a lot of users, you are probably getting the same "poor" performance.  (Note - the problem is not confined to 4.3.1 - it will also be a problem with 3.3.1, as it is due to one of the new User features).

However, there is a simple solution, and here it is.

1. Log in as admin or host
2. Go to the "User Accounts" module (on the Admin menu).
3. Select the "User Settings" module action
4. Click Update to save the Settings.

Savvy users will have by now figured out the problem - The User Settings, which are implemented as Module Settings in the Database do not exist (are null).  Loading the User Settings page loads the default values and clicking "Update" persists them to the database.

Normally, when custom Module Settings are not "set" this does not affect performance but in this case there is a very expensive query that is run when retrieving the default settings.  This query will run every time a setting is needed, because, the GetSetting uses a fallback approach:

a) - try fetching the settings from the Cache
b) - try fetching the settings from the Database
c) - load the default settings (which calls the expensive query GetUserCountByPortal)
d) - get the setting from the collection of settings

On this site, when logging in, 3 different settings are needed, so the query is made 3 times - at a cost of about 800ms each (due to 300,000 users), hence the performance issues.

Now that I have carried out the procedure above (1-4) on this site, the default settings have been persisted to the Database, and the caching mechanism can work -  Login is much faster.

A fix will be added to the next version, so that default values are automaticaly saved to the database on upgrade (or first access).
Tag标签: DNN
posted on 2008-07-04 10:19 花纯春 阅读(43) 评论(2)  编辑 收藏

FeedBack:
2008-07-04 13:31 | Baldwin      
要是时间允许的话,不妨翻译一下,以满足很多对E文比较不感冒的读者,当然只要有心就好 :)
  回复  引用  查看    
#2楼 [楼主]
2008-07-04 17:27 | 花纯春      
最近我在能读Charles Nurse的blog,像读小说一样,欲罢不能,很精彩,强烈建议喜欢DNN的朋友们读一下。http://www.dotnetnuke.com/Community/Blogs/

想过翻译,不过,精彩的太多了,强烈建议去看他的blog.
他56年出生,现在50多了,写的东西果然够劲。

化学专业的,看来程序员里,科班出生的又有成就好像不多。倒是很多有成就的,不是科班生。
  回复  引用  查看    

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
博客园首页

新闻频道

社区

小组

博问

网摘

闪存

  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
成果网帮您增加网站收入


相关链接:
 


《C#编程集》电子报
镇站之页
天气预报-五天
四角号码查询器
文件同步工具
剪切板记录器
天天上站
她的BLOG
挑战恐惧
API资源
C#开源资源大全
英文原版电子书
标准智商测试

最近在研究SPS,发现很多SPSQQ群都满了。所以建一个SharePoint Server QQ群5169485 8-14 13:44

<2008年7月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

与我联系

搜索

 

常用链接

留言簿(2)

我管理的小组

我参加的小组

我参与的团队

我的标签

随笔档案

最新评论

阅读排行榜

评论排行榜