0 Replies Latest reply on Jan 27, 2008 2:43 PM by paulfeuer

    flyweight ItemRenderers?

      couldn't think of a better title for this topic, but i was sort of disappointed when finally looking into Repeater.

      I was expecting something with a name of Repeater to be used to reduce the number of components used to render data. In other words, I would be able to use one instantiated component to control data rendering, and not suffer through hundreds of simple objects whose sole purpose is to paint a String to the screen at certain coordinates.

      I have a grid like thing, actually a series of Lists, displaying pieces of data, and to draw it properly it seems like i need to have hundreds of my ItemRenderers. Given that i'm doing so much else in my application, we're now seeing performance problems, as the application on the client machine grows from a 65MB footprint initially to 300MB over 1 hr without doing anything except letting the data polling continue - and we've already focussed on reducing as much allocation as we can there.

      I'm wondering if anyone has successfully implemented a flyweight type of thing that reuses single instances of ItemRenderers to iterate data and paint to the screen in the right place, properly invalidate display lists, and paint updates.

      It kind of bothers me to have to instantiate a gazillion ItemRenderers. Seems like the ClassFactory could return a single instance, but receiving updates and knowing where those updates are supposed to go looks problematic.