CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2002
    Location
    India - bangalore
    Posts
    53

    Question how to make copy process faster

    Hi,

    I need to copy data from a mapped network drive to local hard disk. I used copyFileEx(). If I compare the speed with some other tools, my application seems 10 times slower. I am using a single thread. Did i need to increase the no. of threads..? and the band width available is limited to 56kbps. Is there any other way to increase the speed of the copying operation.

    please help me out,

    thanks,
    pramod.

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    It should be exactly the same speed as the other copying methods.

    More threads aint gonna do you no good boyo ! You're calling the function on one thread and that's the only one you need.

    Which other tools are you referring to ? How long does a normal explorer copy take to do it ?

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    Also, are you using the callback in CopyFileEx to present a dialog ? If so then the slowdown is probably in your dialog code and not in the actual copying mechanism.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  4. #4
    Join Date
    Feb 2002
    Posts
    5,757
    Sounds like it is a network hardware speed issue. How big is the file?

    Kuphryn

  5. #5
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Originally posted by kuphryn
    Sounds like it is a network hardware speed issue. How big is the file?
    Well...this would affect not only his application but rather others (explorer) as well...

  6. #6
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    CopyFileEx allows you to set up a callback to do presentation of progress.

    Are you using it ? Because if you are then I'll bet its that which is slowing down the copy.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  7. #7
    Join Date
    Apr 2002
    Location
    India - bangalore
    Posts
    53

    thanks

    Hi,

    thanks for the reply. I am using the call back and some operations in that to display the percentage of transfer. probably b'coz of this the copy operation may be slower.

    Thanks to one and all for yr replies,

    Pramod.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured