JesperSP
Member
Dear all,
I have written a VB.net forms program that analyzes a lot of (~1400) jpg images from automated lab-equipment. I am in the process of migrating from WinXP to Win7 and to my surprise I noticed that analysis was 5 times slower under win7 compared to win XP (!?!?!). I investigated further and found that the loading of the jpg images was the step that was takning longer! The simple code below gives me 70 images per second under XP, but only 12 images per second under win7. Has anyone else noticed this performance drop, and can something be done to improve it ?
Cheers,
Jesper
I have written a VB.net forms program that analyzes a lot of (~1400) jpg images from automated lab-equipment. I am in the process of migrating from WinXP to Win7 and to my surprise I noticed that analysis was 5 times slower under win7 compared to win XP (!?!?!). I investigated further and found that the loading of the jpg images was the step that was takning longer! The simple code below gives me 70 images per second under XP, but only 12 images per second under win7. Has anyone else noticed this performance drop, and can something be done to improve it ?
Cheers,
Jesper
VB.NET:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim starttime As DateTime = Now
Dim counter As Integer = 0
For Each filename As String In My.Computer.FileSystem.GetFiles(FolderBrowserDialog1.SelectedPath)
If filename.EndsWith(".jpg") Then
Dim bm As New Bitmap(filename, False)
' do something with bitmap
' PictureBox1.Image = bm
bm.Dispose()
counter += 1
Dim seconds As Double = (Now - starttime).TotalSeconds
If seconds > 0 Then Label1.Text = counter / seconds & " images per second."
Application.DoEvents()
End If
Next
End If
End Sub
End Class