What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Settings Form DataGridView Causing Hangs

Sinbeard

New Member
Joined
Oct 14, 2019
Messages
14
I've been working on a sales stats plugin and I'm using a DataGridView (DGV) to display all the sales in the json db it creates. I think I've gotten it to a mostly stable state (maybe) but the DGV is incredibly slow, especially as the list grows. The json list is bound to the DGV using a BindingList.

One thing in particular - if I leave the window open (unverified if it happens elsewhere) and the list grows long enough to require a scrollbar it will cause the application to hang indefinitely.

upload_2021-2-3_12-10-23.png


Is there a more efficient or better performance way to display data like this? Or am I stuck with a DGV? And if I am stuck with a DGV, what can I do to make it less stupid? It's very annoying.

I can provide a link to the code on github as well if desired. Some of the text is obfuscated for a little bit of security.
 
On a side note, is it possible to obtain these messages while the bot is off? I have a botbase that doesn't do anything that'll capture messages when i'm not using anything, but it'd be convenient if at all possible...
 
In the intervening time from when I posted this I did actually find out about the double buffer thing which is pretty cool. I'll add in that autosize thing as well. I learned as well that apparently updating a BindingList outside the UI thread is a problem. Not only is it wonky, but it seems that scrollbars cause the problem I had above. I changed my code up to use List<string> instead and set a timer to update when the window is open. So far it doesn't explode but it also doesn't update in 'real' time. I probably need to clear and rebind or something.

But anyway it runs a lot smoother and faster now. Code is here if you want to take a look: https://github.com/m3chanical/SalesTracker

Thanks for the tip on the GamelogManager.Pulse(), I'll see if I work that in sensibly.
Thank you!
 
Back
Top