ObjectDataSource 绑定问题
我很清楚 ODS 的一般优点(快速、快速、简单、无代码方法;支持分页和排序)和缺点(表示端的隔离数据逻辑),但我想知道 ODS 的优点和缺点在页面上使用多个 ObjectDataSource 对象以及内存/性能成本。
我目前正在构建一个页面,其中有大约四十个下拉框;该项目的方法是使用 ODS 进行所有绑定,但我意识到在这种情况下这样做的成本。出于增加内存/性能的原因,我是否最好使用标准 ADO.NET 方法?对于如此大的数据量,这两种方法有什么好处?
提前致谢
I'm well aware of the general pros (quick, fast, easy, codeless approach; support for paging & sorting) and cons (isolated data logic on presentation side) of ODSs, but I'm wondering about the pros and cons of using multiple ObjectDataSource objects on a page and the cost on memory/performance.
I'm currently building a page which has circa forty drop down boxes; the approach with the project is to use ODS for all binding, but I'm conscious of the cost in doing so in this scenario. Am I better off using standard ADO.NET approach for increased memory/performance reasons? And what are the benefits to both approaches with such a volume of data?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您认为性能是您的应用程序的主要关注点,那么您可能应该创建两种可能的解决方案,对其进行测试并选择性能最佳的一个。这对您来说当然是很多额外的工作,但我认为这是真正决定哪种方法更好的唯一方法。
因此,如果您认为值得,就这样做,或者选择对您来说更简单、更直观的方法。测试后,您甚至可能会发现这两种方法(在性能上)略有不同,或者其中一种方法仅处理一种特定类型(或数量)的数据速度更快。
If you think that performance is such a major concern for your application, you should probably create both possible solutions, test them and choose the one that performs best. This is certainly a lot of additional work for you, but I think it’s the only way how to really decide which approach is better.
So do it if you think it’s worth it or choose the approach that seems easier and more intuitive to you. After the test you might even find out that the two approaches differ (in performance) just marginally or that one processes faster just one specific type (or amount) of data.