-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conclusion to Performance and Optimization docs
- Loading branch information
Showing
2 changed files
with
85 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
# Profiling | ||
|
||
## Emscripten | ||
## qgis-js Performance Measurement Tool | ||
|
||
The [qgis-js Performance Measurement Tool](../sites/performance/) can be used to measure the performance of the qgis-js application in a reproducible way: | ||
|
||
``` | ||
cd sites/performance | ||
npm run dev | ||
``` | ||
|
||
1. Boot the runtime | ||
2. Load a project | ||
3. Render a first dummy frame | ||
4. Start the performance test | ||
|
||
## Browsers | ||
|
||
### Chrome | ||
|
||
The Performance tab of the Chrome DevTools can be used to profile the performance of the qgis-js application. See the [official documentation](https://developer.chrome.com/docs/devtools/evaluate-performance/) for more information. | ||
|
||
![Firefox Profiler](https://developer.chrome.com/static/docs/devtools/performance/image/the-results-the-profile-5d830d01508e2_2880.png) | ||
|
||
- 💡 In order to get useful results (e.g. function names in the `.wasm` module), the [build type](../README.md#build-types) has to be set to `Dev` or `Debug` | ||
- ⚠️ Note that the `Debug` build type is significantly slower than the `Dev` build type | ||
|
||
### Firefox | ||
|
||
The [Firefox Profiler](https://profiler.firefox.com/) can be used to profile the performance of the qgis-js application. | ||
|
||
![Firefox Profiler](https://profiler.firefox.com/b45b29da558efa211628.jpg) | ||
|
||
- 💡 In order to get useful results (e.g. function names in the `.wasm` module), the [build type](../README.md#build-types) has to be set to `Dev` or `Debug` | ||
- ⚠️ Note that the `Debug` build type is significantly slower than the `Dev` build type | ||
|
||
## Emscripten | ||
|
||
- Emscripten provies a [profiling guide](https://emscripten.org/docs/optimizing/Optimizing-Code.html#profiling) and some embeddable tools to profile the application: | ||
- `--cpuprofiler` | ||
- `--memoryprofiler` | ||
- `--threadprofiler` | ||
|
||
## QGIS profiling | ||
|
||
- It would be nice to extend the qgis-js API in order to retrieve profiling information from the QGIS core | ||
- ⚠️ This is not yet implemented |