On Monday 06 Oct 2003 8:11 am, Guillaume Laurent wrote: > On Monday 06 October 2003 09:55, Chris Cannam wrote: > > Actually I have thought of one potential optimisation that might > > work nicely. It's a long shot though. Hm. > > And that is ?
Roughly it's this. At the moment we do various layout phases, and then we call the positionElements/renderElements functions on the staffs which actually make the element pixmaps and so forth. The layout phases together take maybe a third of the time, the render phases maybe two thirds; and the layout phases are more likely to be amenable to optimisation as they're all our code (much of the render phase is stuck in Qt stuff). So, the principle is that we don't call the staff's position or render code from NotationView at all; we defer it and do it on demand. We do the layout (which gets us the bar positions etc) and size the canvas and so on, and then we override QCanvasView::drawContents in NotationCanvasView so as to calculate which bars are within the timeframe of the area needing drawn, check whether each staff has already rendered those bars, and ask the staff to render if not. And then to call the parent's drawContents method as well of course. More complicated than that in practice (especially when you consider page layout) and I have no intention of trying it now, but I don't see why it shouldn't work and save quite a bit of time when rendering long compositions. Do you? Chris ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Rosegarden-devel mailing list [EMAIL PROTECTED] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
