-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compact.AppendOutputText is very slow #70
Comments
Use Private Sub AppendOutputText(ByVal text As String) 'Attach output to the embedded console
Try
If conOut.InvokeRequired Then
Dim serverOutDelegate As New AppendOutputTextDelegate(AddressOf AppendOutputText)
Me.Invoke(serverOutDelegate, text)
Else
If text <> vbCrLf Then
conOut.Items.Insert(0, text)
End If
End If
Catch ex As Exception
End Try
End Sub |
Just wondering how much of a hit there is, and what sort it is (RAM, CPU)? Just curious, as the richtextbox is easier to use. EDIT: Never mind, damn that's a huge hit, there's no way of knowing this was happening outside of actually testing them both 😮 |
@Nukepayload2 And pass text as reference please. |
I've been running performance tests using the Query compact option, rather than actually compressing and decompressing files over time. The difference is that when querying, it does so in quiet mode = only listing directories, not each file, so the performance hit wasn't noticed. I'm implementing this now :) @RebelliousX what do you mean by "pass text as reference"? |
@ImminentFate Jus noticed the function that @Nukepayload2 posted above, the String argument is passed by value Plus try to run concurrent and multiple |
@RebelliousX |
Correct, but the passing of the the parameter I use C++ mainly. But last time I used VB.Net was 5 years ago in college, so I could be wrong. But I think it won't hurt to make it by reference (it could improve performance too). |
I tested it just now, the difference between using a richtextbox vs a listbox is massive, but I can't detect any changes between ByVal and ByRef, so I'll probably just leave it as is for now |
@RebelliousX |
Compact.AppendOutputText(String)
encumbers performance when compacting a folder which has large number of files inside. The longer console output, the more execution time ofCompact.AppendOutputText(String)
.Consider replacing
conOut
with a virtualizing control such asListBox
to make this program faster.The text was updated successfully, but these errors were encountered: