Click here to Skip to main content
15,920,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld11-Jul-10 10:37
professionalDaveAuld11-Jul-10 10:37 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 11:39
malcomhfc11-Jul-10 11:39 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld11-Jul-10 12:28
professionalDaveAuld11-Jul-10 12:28 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
malcomhfc11-Jul-10 12:50
malcomhfc11-Jul-10 12:50 
GeneralRe: retrieve the salt from a mysql database for a password. [modified] Pin
DaveAuld11-Jul-10 13:00
professionalDaveAuld11-Jul-10 13:00 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
Luc Pattyn11-Jul-10 13:42
sitebuilderLuc Pattyn11-Jul-10 13:42 
GeneralRe: retrieve the salt from a mysql database for a password. Pin
DaveAuld13-Jul-10 7:57
professionalDaveAuld13-Jul-10 7:57 
QuestionFile copy performance... one more time Pin
Sonhospa11-Jul-10 2:02
Sonhospa11-Jul-10 2:02 
Hi everybody,

one of the old-but-useful tools we work with collects thousands of large image files (meeting particular requirements) and copies them to a separate place on the network. By now this was done with a batch file processing a filelist from a textfile.

I'm trying to replace the tool by a .NET application, but the copy process seems to be a lot slower than the batch copy. After my approaches to split the copy process to different threads have failed, I'm examining a very simple process using a Backgroundworker:
Private Function BGW_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) As Boolean Handles BGW.DoWork
    Dim i As Integer = 0
    Dim copyResult As Boolean = False
    Dim args As copypathArgs = e.Argument

    For Each fl As String In args.FileArray
        i += 1
        e.Result = i
        copyResult = DoCopy(Path.Combine(args.sourceDir, fl), Path.Combine(args.targetDir, fl))
        BGW.ReportProgress(i / args.FileArray.Length * 100, fl)
    Next
End Function

Private Function DoCopy(ByVal source As String, ByVal target As String) As Boolean
    Dim overwrite As Boolean = True
    Try
       My.Computer.FileSystem.CopyFile(source, target, overwrite)
       Return True

       Catch ex As Exception
          Return False
      End Try
    End Function

The problem is that copying a complete array of files takes much longer than the old method using a batch file. As a consequence and considering a large amount of files, the users react more or less like "I want my old batch file back" to avoid double (sometimes even triple) copy time.

Is the copy process in .NET really so much slower? Are there any other methods which have a better performance? Any other recommendations?

Thank you
Michael
AnswerRe: File copy performance... one more time Pin
Luc Pattyn11-Jul-10 11:01
sitebuilderLuc Pattyn11-Jul-10 11:01 
GeneralRe: File copy performance... one more time Pin
Sonhospa11-Jul-10 12:35
Sonhospa11-Jul-10 12:35 
GeneralRe: File copy performance... one more time Pin
Luc Pattyn11-Jul-10 12:51
sitebuilderLuc Pattyn11-Jul-10 12:51 
QuestionAny way to access Parent Form From a class? Pin
Аslam Iqbal9-Jul-10 21:47
professionalАslam Iqbal9-Jul-10 21:47 
AnswerRe: Any way to access Parent Form From a class? Pin
Luc Pattyn9-Jul-10 22:36
sitebuilderLuc Pattyn9-Jul-10 22:36 
GeneralRe: Any way to access Parent Form From a class? Pin
Аslam Iqbal10-Jul-10 5:03
professionalАslam Iqbal10-Jul-10 5:03 
GeneralRe: Any way to access Parent Form From a class? Pin
darkelv10-Jul-10 18:45
darkelv10-Jul-10 18:45 
QuestionGet name in FlowLayoutPanel child control Pin
ivo759-Jul-10 4:38
ivo759-Jul-10 4:38 
AnswerRe: Get name in FlowLayoutPanel child control Pin
Dave Kreskowiak9-Jul-10 9:41
mveDave Kreskowiak9-Jul-10 9:41 
GeneralRe: Get name in FlowLayoutPanel child control Pin
ivo759-Jul-10 11:47
ivo759-Jul-10 11:47 
AnswerRe: Get name in FlowLayoutPanel child control Pin
Luc Pattyn9-Jul-10 10:11
sitebuilderLuc Pattyn9-Jul-10 10:11 
QuestionComboBox help Pin
RyJaBy8-Jul-10 3:33
RyJaBy8-Jul-10 3:33 
AnswerRe: ComboBox help Pin
Wayne Gaylard8-Jul-10 4:24
professionalWayne Gaylard8-Jul-10 4:24 
GeneralRe: ComboBox help Pin
RyJaBy8-Jul-10 4:34
RyJaBy8-Jul-10 4:34 
AnswerRe: ComboBox help Pin
Scubapro8-Jul-10 4:27
Scubapro8-Jul-10 4:27 
GeneralRe: ComboBox help Pin
RyJaBy8-Jul-10 4:34
RyJaBy8-Jul-10 4:34 
AnswerRe: ComboBox help Pin
Luc Pattyn8-Jul-10 8:15
sitebuilderLuc Pattyn8-Jul-10 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.