Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Event overflow

 
Hawk Eye
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another question I had is what strategies have you found useful in handling lots of events. I'm working on a fairly complicated swing application and we continue to add new events to the system. This ends up to the point where the user clicks one button and so many events start flying that it is hard to debug and begins to impact performance. How have you approached this problem?
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Events can be trick. One thing I like to do is have application level events so you separate out item loaded from say a mouse clicked event. This causes only the appropriate listeners to listen to the right things instead of having 100 different mouse listeners. Also it may be helpful to have levels of events so that all your events don't propogate everywhere. This usually ties in with some event consolidation logic that will collapse say the last 10 notifies down into one event if many are fired. I've also seen systems that intelligently figure out that events A+B are equivelant to event C and therefore collapse things that way as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic