Comments on table, dynamic controls, C# and asp.net -
imagine table , button add new rows table. on each click button, new row inserted @ end of table. button event functioning follows:
- first of all, points out reference row copy.
- whatever controls , text inside referenced row copied datatable. since datatable cannot hold controls converting them strings , saving them that.
at end, datatable stored within cache.
finally, on each page_init event re-create table using data inside datatable. works fine.
however, i'm curious. since have 3 5 tables in page , of them stored in different cache different datatable, , of them re-created during page-cycle events, may cause problems in future? way, please note once user leaves page cache deleted.
i did not want paste whole code here since it's bit long , may alienate people reading question. can give statistics can make comments on it.
the class i've written 118 lines long. during process of recreation of table, there 3 nested for/foreach loops, not long (the average loop times 5 10 each). , finally, mentioned above, re-create table datatable saved in cache used.
so, ask question again: code works perfectly, know if building such code performance-friendly?
it depends on amount of data in table (number of rows / columns).
if small like, pulling down list of 10 users , logins , passwords example, work fine no performance issues.
but if going thousands , thousands of records, start have performance issues.
edit: write script fill database "worse case" expected amount of data, , see how performs.
Comments
Post a Comment