Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
advanced-topics.qdoc
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qtqml-advanced-topics.html
6\title Advanced QML Topics
7\brief Advanced features and optimization techniques for QML
8
9This section covers advanced topics for optimizing and fine-tuning QML applications.
10
11\section1 Caching and Performance
12
13\section2 The QML Disk Cache
14
15\l{The QML disk cache}{The QML disk cache} stores compiled QML and JavaScript code on disk
16to improve application startup time. When a QML document is loaded for the first time, it's
17compiled to bytecode and cached in a platform-specific location. Subsequent loads of the
18same document can use the cached bytecode instead of recompiling from source, significantly
19reducing initialization overhead.
20
21\section1 JavaScript Engine Configuration
22
23\section2 Configuring the JavaScript Engine
24
25\l{Configuring the JavaScript engine}{The JavaScript engine can be configured} with various
26environment variables to control compilation behavior, garbage collection settings, and
27runtime optimizations. These settings allow you to tune the JavaScript engine for specific
28use cases, such as favoring startup time over peak performance or adjusting memory usage
29patterns.
30
31\section2 Memory Management in the JavaScript Engine
32
33\l{Memory Management in the JavaScript Engine}{The JavaScript engine uses garbage collection}
34to automatically reclaim memory from objects that are no longer in use. Understanding how
35the garbage collector works, including generational collection strategies and heap organization,
36helps you write QML and JavaScript code that performs efficiently and avoids common memory-related
37performance pitfalls.
38
39\sa {QML Profiler}, {JavaScript Host Environment}
40*/