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. 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...
You can run GamelogManager.Pulse() from a thread, not recommended to run that while the main bot is actually running tho since its prolly not threadsafe As for the DGV, they are semi-notorious for being slow randomly https://stackoverflow.com/questions...ce-in-populating-datagridview-with-large-data
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!