Click here to Skip to main content
15,887,896 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a PlaceHolder control on my abc.aspx form, in this form has a tree. On clicking a tree node, I load a specific UserControl. The UserControl has muliple text fields as well as a grid. In the user control I set the data into the controls.

How can I improve the performance of the dynamically load user control?
Posted
Updated 15-Mar-19 6:31am
v2
Comments
R. Giskard Reventlov 16-Feb-11 4:48am    
Without knowing what the control is, what it does, how it was built and where it is used and how there is no earthly way to answer such a question. In any case, what have you already tried?
Manas Bhardwaj 16-Feb-11 4:50am    
what have you tried so far?
amit_83 16-Feb-11 5:39am    
i have a PlaceHolder control on my abc.aspx form, in this form has a tree, On click at tree node, i am loading a specific UserControl,
UserControl has muliple text field as well as a grid. at user control
i am setting the data also.
Abdul Quader Mamun 16-Feb-11 4:51am    
Question is not Clear.
RaviRanjanKr 16-Feb-11 4:54am    
What do you mean by "improve the performance" be clear while asking question

I agree with Keith, but would add that for quick timings, look at the Stopwatch class[^]
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
... // Do some part of you app.
TimeSpan ts1 = stopWatch.Elapsed;
... // Do more of your app
TimeSpan ts2 = stopWatch.Elapsed;
You will then be able to tell which parts of your control are taking the time, and focus on them
 
Share this answer
 
Your question is really unclear. You don't say what you mean by performance, nor why it is slow, nor what youe control does.

When people comment, you should ammend your question, not reply, otherwise people won't read or understand your question fully,

The correct answer is, I'm afraid, we just don't know how to improve the performance because we don't know enough about how your code works but here are some guidelines:

1. Unless the performance is poor, don't try and optimise anything to the nth degree, your code's maintainability will decrease.

2. More than liklely getting the data is causing any problems with speed you may be having.

3. If you really are having problems, you will need to time various sections of code to see which is causing the problem. There are profiling tools available ih the higher-end versions of Visual Studio, or you can just log timings to a file temporarily.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900