UI/area questions

Vladimir Prus ghost at cs.msu.su
Sat Dec 15 21:55:06 UTC 2007


On Sunday 16 December 2007 00:44:35 Hamish Rodda wrote:
> On Sun, 16 Dec 2007 08:30:28 am Vladimir Prus wrote:
> > On Saturday 15 December 2007 23:24:31 Andreas Pakulat wrote:
> > > On 15.12.07 12:24:41, Vladimir Prus wrote:
> > > > Folks,
> > > > I have some questions about Sublime, areas and mainwindows behaviour.
> > > >
> > > > 1. Presently, the list of documents appear to be maintained by
> > > > Sublime/Area. It also appears that whenever a View is added to Area, a
> > > > real widget for that View is created -- see
> > > > MainWindowPrivate::ViewCreator::operator()
> > > >
> > > > Then, it means that if I have mainwindow with 100 open documents, and
> > > > create a new mainwindow, then the new mainwindow will create 100 view
> > > > widgets, even though only one document is immediately shown, and I
> > > > might never open 99 others. Even if view are supposed to be
> > > > lightweight, I doubt that fresh Kate widget is exactly 4 bytes in size,
> > > > and so such design seems rather resource hungry.
> > > >
> > > > To make matters worse, I would expect "Debug" area to be able to show
> > > > source *and* to be able to switch to arbitrary source file. Then, we'd
> > > > need 100 view widgets there.
> > > >
> > > > Would not a better design make Sublime more 'lazy' so that real view
> > > > widgets are created only when actually needed?
> > >
> > > I agree about the lazy loading. Just wanted to note that there's a
> > > reason why the widget is not shared among multiple areas: It gets
> > > complicated and there are quite some problems with that, see the wiki
> > > and look for KDevelop4 UI Puzzles.
> >
> > I realize you can't share a given view widget between different
> > mainwindows; and that even sharing a view widget between areas in one
> > window can be tricky. I was complaining only about the need to create views
> > for all documents in all mainwindow/area pairs.
> 
> IIUC that is a bug... perhaps a side effect of the way you've implemented the 
> loading via document controller rather than direct config within the sublime 
> code.

Err, that code was forcing creation of widget before I touched it ;-)

- Volodya




More information about the KDevelop-devel mailing list