DAW-like timeline with multiple Components or...?


#1

I wonder if it would be viable to implement a DAW-like timeline with multiple Components representing the media clips or if it would be better to have one Component subclass that draws the clips and handles their mouse manipulation. The first approach has the benefit that the mouse handling and other stuff would happen more automatically. But maybe having potentially tens of thousands of components around isn't such a great idea? (I would like the solution to be scalable to these kinds of amounts of media clips, just in case...) How would the memory consumption be? Would searching/detecting the child components based on their coordinates slow down?

The second approach of handling everything within a single Component would probably be more optimizable but would involve a ton more work...


#2

I's say use sub-components for the clips! That's how we do it in tracktion, and it's not really a huge overhead. The tricky bit is making sure it handles off-screen clips nicely, and watch out for the big-O complexity of the algorithms that create/remove the components.


#3

OK, thanks. I'll look into it!