In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
VS 2003DataGrid established some of the difficulties and solutions are what, for this problem, this article describes the corresponding analysis and solutions in detail, hoping to help more want to solve this problem of small partners to find a simpler and easier way.
This chapter describes the introduction and techniques of VS 2003DataGrid and how to create VS 2003DataGrid. I spent months researching and learning from IT elites. There may be a lot of mistakes that I haven't picked out. Please correct me.
But the result is unexpected, DataGrid efficiency is higher than Repeater! Tell me about my test method in detail. Please see if there is any problem with my test method. If there is no problem, what is the reason for this imagination?
Hardware: CPU:AMD XP2000+, 80G hard disk, 512M memory. Software: Windows 2003 + sp1, VS2003, SQL Server 2000 + sp4 Test data: Display a table (city table) in the data, 4 fields, 349 records. Purpose of the test: the efficiency of displaying data on the pages of the website. Test only the function of displaying data, regardless of other aspects
VS 2003DataGrid uses autofill, repeater code:
td> td> td> td> tr> ItemTemplate> asp:repeater>table>
I often see articles saying that repeaters perform better than VS 2003DataGrid, but what about my test results?
Test results:
Displays 10 records, no ViewState, DataTable binding controls, DataGrid using bound columns.
DataGrid : around 250 rps.
Repeater : method: about 200 rps.
Repeater : Method: 250 rps a little more.
Repeater : Method: 250 rps a little more.
3 and 4 are a way to bind data that I just found. It seems that this binding method is too inefficient.
The general binding method uses DataBinder.eval binding regardless of the data source (Dataread or dataset). Regardless of the data type eval converts the data object to a string. A lot of work has been done on the underlying bindings, using reflection capabilities.
undefined
It is because it is easy to use, but it affects data performance. Take a look. When bound to a dataset, DataItem is actually a DataRowView (or an IdataRecord if bound to a dataread). Therefore, converting directly to DataRowView will greatly improve performance.
It is recommended to bind data. When the amount of data is large, it can increase the speed by hundreds of times. Note 2 aspects when using: 1. Add to the page. 2. Pay attention to the case of field names (pay special attention). If inconsistent with the query, it can lead to a higher probability of failure than
< %# DataBinder.Eval(Container.DataItem, "字段名") %>slower. If you want to further improve the speed, you can use the method. However, its readability is not high.
About VS 2003DataGrid to establish some difficulties and solutions is what the answer to the problem to share here, I hope the above content can be of some help to everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.