How can I optimize the loading of data into my datasets? I have developed an application that takes quite a time to load whenever I click on a menu that calls a form. I do get my data in the Load event of the form. Can this be optimized so as to load the forms faster? Thank you.
If you've got a lot of data, there isn't much you can do. While it could open a whole can of worms, what you might want to look at is doing your data retrieval in a background thread so as the form load occurs and the data retrieval occur at the same time. Of course, this could mean a lot of problems with synchronization between the threads and the UI.
Another approach may be to only ask for the amount of data that will be displayed in the datagrid view so you'll only have to get a subset of the data. As the user moves through the datagrid, you'll have to request the data you haven't yet retrieved. This means you'll have to keep track of what data you've retrieved and what you haven't so you don't get the same data multiple times.
Dig Deeper on .NET tutorials, guides and quizzes
Related Q&A from John Robbins
What is a JAD session? This term is referred to often in job postings and seems like some kind of brainstorm you carry out with a client to define IT... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.