Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Improving performance of C# program when run from network drive

Improving performance of C# program when run from network drive

Scheduled Pinned Locked Moved C#
performancecsharpsysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eljainc
    wrote on last edited by
    #1

    Hello, I am having some problems when running a C# application that I've written. It runs fairly smooth on a local machine (test machine). However, when I am running this from a network drive, the responsiveness is slow. When I click on a button that opens up a form, there is a considerable lag (5-10 seconds sometimes). Is there anything that I can do to speed this up on a network?

    D J 2 Replies Last reply
    0
    • E eljainc

      Hello, I am having some problems when running a C# application that I've written. It runs fairly smooth on a local machine (test machine). However, when I am running this from a network drive, the responsiveness is slow. When I click on a button that opens up a form, there is a considerable lag (5-10 seconds sometimes). Is there anything that I can do to speed this up on a network?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There is no generic method that will speed anything up. Code doesn't run faster or slower depending on where you ran it from. Code runs at the processor speed, not the network. Now, any processing you have on data is remote locations or stored in files is where you'll run into problems with performance. Since we have no idea what you're code is doing when you "click a button that opens up a form", there is nothing anyone can tell you that is going to help. We need more detail about EXACTLY what your code is doing when you run into this problem.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      • E eljainc

        Hello, I am having some problems when running a C# application that I've written. It runs fairly smooth on a local machine (test machine). However, when I am running this from a network drive, the responsiveness is slow. When I click on a button that opens up a form, there is a considerable lag (5-10 seconds sometimes). Is there anything that I can do to speed this up on a network?

        J Offline
        J Offline
        Jason Gleim
        wrote on last edited by
        #3

        As Dave mentioned, you didn't give a lot of details so I'll take a stab in the dark and say that your "work" is probably being done on the UI thread rather than on a background worker or other type of thread. (If you have no idea what that means then you are definitely working on the UI thread.) That will kill UI performance if you start mixing long-running operations such as disk-based access or network-based access. Your UI will hang while it processes the work because there is only one guy in the room doing anything. If this is the case, you will want to change your worker method(s) to use an async pattern so you can decouple the long-running work operations from the UI. That will keep things responsive... at least on the UI.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups