使用巨大的 App_Browsers mobile.browser 文件是不是一个坏主意?
我在 ASP.NET 2.0 中无法正确检测移动设备功能。
然后,我遇到了这个项目:
基本上,它是一个 xml文件(.browser 文件)包含许多移动设备浏览器的定义。问题是这个文件大约有 350k 行长。由于我正在检查每个页面请求的参数,因此我担心使用如此大的文件可能会减慢服务器响应速度。
你怎么认为?
I was having trouble detecting mobile device capabilities correctly in ASP.NET 2.0.
Then, I ran across this project:
Basically, it is an xml file (.browser file) containing definitions for lots of mobile device browsers. The problem is this file is about 350k lines long. Since I'm checking parameters on every page request, I'm worried that using such a large file could slow down server responses.
What do you think?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MDBF 很棒,并且在应用程序启动后(当文件被解析和缓存时)没有任何问题。只要您的服务器上没有资源问题(这意味着文件需要定期重新加载),就可以了。
然而! 不再支持 MDBF 并且不会进一步更新。考虑使用 http://51 Degrees.codeplex.com/ 代替。
MDBF is great and has no issues after applciation start up (when the file gets parsed and cached). As long as you don't have resource issues on your server which mean that the file will need to be regularly reloaded you'll be fine.
However! MDBF is no longer supported and won't be updated further. Consider using http://51degrees.codeplex.com/ instead.
速度绝对够快。我有一个使用该数据库的网站,页面加载时间为亚秒级。
It's definitely quick enough. I have a site using that database and the page load times are sub-second.