Search Architecture General Forum Search All Architecture Forums Search All MSDN Forums RRS feed

  • Question

  • User-1604309053 posted

    I am using VS 2008 and ASP.net 3.5.

    I have a scenario , where-in the user uploads an excel sheet containing around 110 sheets in one excel sheet with around 1000 rows in each sheet. SO a total of 100 K rows in the excel sheet. Now this excel sheet is uploaded via a dotnet webpage and then all the data is pushed into the database. Now it takes a very long time to upload this data. Is there any way that I can do something in the dotnet coding to reduce the time it takes to upload the data. Also during the time, when the user uploads the data, he has to wait for around 10 mins before he can do any action. How best can I design the application to improve the performance

    Thanks in Advance

    Monday, July 18, 2011 9:31 AM


  • User-952121411 posted

    Yes, you should be able to leverage some asynchronous operations to load that data assuming you have a multi-core processor on the server and some available threads to take advantage of reduced processing time. If there is any possibility that you can use the .NET Framework 4.0 then you can utilize PLINQ or the Task Parallel Library. TPL will make you feel like an async hero without having to do much coding at all. If you can use 4.0, then check out this article on doing tasks in parallel:

    Task Parallelism (Task Parallel Library):


    If 3.5 is a must, you can still use Asynchronous delegates or even threads (if you choose to do so, but the threading 'abstraction' methods in the .NET Framework are much easier to use). Take a look at the following:

    Calling Synchronous Methods Asynchronously:


    Asynchronous Programming Design Patterns:


    Regardless, you are still uploading a ton of data and it is going to take a while regardless of the method you use. Remember also, user perception of waiting can be drastically different between an informative UI (progress bars, status information, etc) rather than some hourglass and a non-responsive screen, so consider these details as well.

    Hope this helps! Smile

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 18, 2011 4:14 PM