Hi Martin,

I'm not quite sure what the problem is from the below info. Is it that if you 
have ListView and C++ model -> you change the Model data -> performance goes 
down?

The Model interface is a known performance bottleneck, see the following:
View Delegates
Delegates must be created quickly as the view is flicked. There are two 
important aspects to maintaining a smooth view:
*         Small delegates - keep the amount of QML to a minimum. Have just 
enough QML in the delegate to display the necessary information. Any additional 
functionality that is only needed when the delegate is clicked, for example, 
should be created by a Loader as needed.
*         Fast data access - ensure the data model is as fast as possible.
http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeperformance.html

You can use the cacheBuffer property to reduce the number of model accesses, I 
wonder if that would help. What I've heard is that it is only really useful 
when every item in the view can be cached (very small lists).
http://doc.qt.nokia.com/4.7-snapshot/qml-listview.html#cacheBuffer-prop

- Pasi


From: [email protected] 
[mailto:[email protected]] On Behalf Of ext 
[email protected]
Sent: 28. tammikuuta 2011 4:24
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [Qt-qml] on device performance

Are you able to capture this problem in a small example?

Br,
Martin.

From: [email protected] 
[mailto:[email protected]] On Behalf Of ext 
Alexey Zaryanov
Sent: Tuesday, 25 January 2011 8:52 AM
To: Cornelius Hald
Cc: [email protected]
Subject: Re: [Qt-qml] on device performance

I have some new troubles (ListView and my own C++ model):
Spent a lot of time cleaning the model (more than 100 ms on n900)
example:

void QObjectListModel::clear()
{
    beginRemoveRows(QModelIndex(), 0, m_objects.count());
   // bla bla
    endRemoveRows();
    emit countChanged();
}

And next problem. IU works well at first time, but if i change model data - 
performance is going down. =(
2010/12/18 Cornelius Hald <[email protected]<mailto:[email protected]>>
> If you aren't doing so already, I'd suggest also:
> * running using the raster graphics system (i.e. raster + GL viewport). This 
> has an impact because so many of the items cache their drawing to pixmaps.
> * turning off sample buffers (below is what we do in qmlviewer), as long as 
> the graphical results are acceptable to you
>
> QGLFormat format = QGLFormat::defaultFormat();
> format.setSampleBuffers(false);
> QGLWidget *glWidget = new QGLWidget(format);
> //### potentially faster, but causes junk to appear if top-level is Item, not 
> Rectangle
> //glWidget->setAutoFillBackground(false);
> view->setViewport(glWidget);
>
> * As mentioned in an earlier reply, running fullscreen rather than maximized 
> if possible (compositing is quite expensive, and avoiding it gives a very 
> nice performance bump)
Thanks for the tips! Are there any similar optimizations that can be done for 
Symbian^1 and Symbian^3 devices?

Cheers,
Conny


_______________________________________________
Qt-qml mailing list
[email protected]<mailto:[email protected]>
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to