Design efficient user interactive event log so that I won't exceed my 10000 user object limit.

StackOverflow https://stackoverflow.com/questions/4770130

  •  22-10-2019
  •  | 
  •  

Question

I have a problem: in my application I get some event-related information, so for event x I should get a form window in which I do some sort of things (enter some text and click on a button)

My problem is that for my application there is a 10,000 user objects limit (as for all c# apps), and for my existing code there are already 3000 user objects occupied (so that leaves around 7000 user objects free). I receive from 200 clients info about events regarding some stuff going on each of the clients.

When I receive info about an event from a client I would like to somehow display this as a label in an event log window and when I click on the label the specific form window (that I mentioned earlier) should pop-up so that I may enter some text and click on a button.

I need to be able to display this event log window efficiently (because I could receive up to 1000 events from every client and if every label in this log occupies 1 object that means that for every client there will be 1000 objects (max, but possible) so I would exceed very much my 10000 limit).

How can I do something about it efficiently?

Currently for every event I launch a form window in which I enter text and click on a button but this is not efficient (because my form window occupies already 3 user objects and if I have a max 3 * 200 clients * 1000 user object i exceed my 7000 limit by far).

Was it helpful?

Solution

I struggle to see how you can get thousands of windows from a user interface like this. If you create one label control for each individual notification then, yes, this can get badly out of hand in a hurry. Makes it dreadfully slow too.

Don't use label controls, use a ListBox, ListView, TreeView or DataGridView. Controls that can display multiple items but only consume a single window handle.

OTHER TIPS

As Hans Passant said - Win32 isn't designed to be used in the way you are trying to use it.

A typical implementation could look like this:

alt text

If there are many items (a few thousand, as you expect), a quick search box to filter the items in the list is almost mandatory.

If the details are complex, you can replace the static web browser control with HTML generated on the fly.


If you insist on buttons-per-event (which I wouldn't recommend for your UX) you'd need to render it yourself, which is a PITA in GDI. Or use a web browser control

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top