aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-10-05 09:05:40 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-05 01:06:47 +0200
commit8846c36bcad1d05879e6765953c5267ae782a905 (patch)
tree84f42ccb0ccfc0cec6bcfed1f2cd2aba50299e6f /doc
parenta617073f6b93f01f112f92a80b52247daa951713 (diff)
Couple more performance tips.
Change-Id: Id0f5db95addd6ecc6c2816ba8dbfae58fa8e231f Reviewed-on: http://codereview.qt-project.org/6001 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/qdeclarativeperformance.qdoc44
-rw-r--r--doc/src/qtquick1/declarativeui.qdoc2
-rw-r--r--doc/src/qtquick1/qdeclarativeperformance.qdoc2
4 files changed, 22 insertions, 28 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 6f79cffdb2..d79f474da3 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -50,7 +50,7 @@ Qt applications.
\o \l{QML for Qt Programmers}{QML Programming for Qt Programmers}
\o \l{Getting Started Programming with QML}
-\o \l{What's New in QtQuick 2}{What's New in the Qt Quick Release}
+\o \l{What's New in Qt Quick 2}{What's New in the Qt Quick Release}
\o \l{QML Examples and Demos}
\endlist
diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc
index adbd9db753..737f19f67a 100644
--- a/doc/src/declarative/qdeclarativeperformance.qdoc
+++ b/doc/src/declarative/qdeclarativeperformance.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
-\page qdeclarativeperformance.html
+\page qtquick2-performance.html
\title QML Performance
\section1 Opaque Items
@@ -115,36 +115,30 @@ provide an image that includes the frame and the shadow.
Avoid running JavaScript during animation. For example, running a complex
JavaScript expression for each frame of an x property animation.
-\section1 Rendering
+\section1 Loading later
-Often using a different graphics system will give superior performance to the native
-graphics system (this is especially the case on X11). This can be configured using
-QApplication::setGraphicsSystem() or via the command line using the \c -graphicssystem
-switch.
+Startup time is influenced by the amount of QML that must be loaded. Breaking your
+application into components which can be loaded when needed will allow faster startup time.
+This allows better runtime memory management by unloading the components when no
+longer needed.
-You can enable OpenGL acceleration using the \c opengl graphics system, or by setting a
-QGLWidget as the viewport of your QDeclarativeView.
+This may be achieved by using either \l Loader or creating components
+\l {Dynamic Object Management in QML}{dynamically}.
-You may need to try various options to find what works the best for your application.
-For embedded X11-based devices one recommended combination is to use the raster graphics
-system with a QGLWidget for the viewport. While this doesn't guarantee the \bold fastest
-performance for all use-cases, it typically has \bold{consistently good} performance for
-all use-cases. In contrast, only using the raster paint engine may result in very good
-performance for parts of your application and very poor performance elsewhere.
+\section1 Property Types
-The QML Viewer uses the raster graphics system by default for X11 and OS X. It also
-includes a \c -opengl command line option which sets a QGLWidget as the viewport of the
-view. On OS X, a QGLWidget is always used.
-
-You can also prevent QDeclarativeView from painting its window background if
-you will provide the background of your application using QML, e.g.
+When possible use a specific type, rather than variant, when declaring properties.
\code
-QDeclarativeView window;
-window.setAttribute(Qt::WA_OpaquePaintEvent);
-window.setAttribute(Qt::WA_NoSystemBackground);
-window.viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
-window.viewport()->setAttribute(Qt::WA_NoSystemBackground);
+Item {
+ property variant foo: 10
+ property real bar: 10
+
+ x: foo * 2
+ y: bar *3
+}
\endcode
+bar is faster than foo.
+
*/
diff --git a/doc/src/qtquick1/declarativeui.qdoc b/doc/src/qtquick1/declarativeui.qdoc
index 568eaf9ba4..6769fb0ead 100644
--- a/doc/src/qtquick1/declarativeui.qdoc
+++ b/doc/src/qtquick1/declarativeui.qdoc
@@ -140,7 +140,7 @@ examples for porting}
\list
\o \l{QML Best Practices: Coding Conventions}{Coding Tips}
-\o \l{QML Performance}{Performance Tips}
+\o \l{QML Performance - Qt Quick 1}{Performance Tips}
\endlist
\section1 License Information
diff --git a/doc/src/qtquick1/qdeclarativeperformance.qdoc b/doc/src/qtquick1/qdeclarativeperformance.qdoc
index 03643e72a6..ba2402c154 100644
--- a/doc/src/qtquick1/qdeclarativeperformance.qdoc
+++ b/doc/src/qtquick1/qdeclarativeperformance.qdoc
@@ -27,7 +27,7 @@
/*!
\page qdeclarativeperformance.html
-\title QML Performance
+\title QML Performance - Qt Quick 1
\section1 Opaque Items