Commit 9c6ea6c
feat: Add a demo how to implement performance metrics using our callbacks (#7077)
* document the performance metrics
* expose PerformanceMetrics of the map
* make the map and performance api work nicely with multiple map instances
* write an performance example page
* fix ts import
* update index
* reimplement the PerformanceMonitor without the small memory leak
* rename the metrics
* fix typo
* simplify the code a bit
* fix initalisation typing bug
* add lastFrameTimeMs
* add resetRuntimeMetrics
* update docs
* inital tests
* fix naming
* fix import
* fix lints
* add the reset function to the metrics example
* bump bundle size
* Apply suggestion from @CommanderStorm
* refactor: make function and variable naming in `PerformanceUtils` more sensible (#7096)
* rename the PerformanceUtils
* make PerformanceUtils.remove adhere to how this is named across the codebase
* document validateStyle better
* change to different spelling
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @CommanderStorm
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* make the hash tests even more strict where the line between valid and invalid is (#7097)
* fix: handle WebGL context loss when style is not loaded (#7094)
* fix: handle WebGL context loss when style is not loaded
Fix TypeError when WebGL context is lost before the map style is loaded.
When a map is created without a style (or the style hasn't finished loading),
this.style is null. The _contextLost handler was accessing this.style._layers
and calling this.style.destroy() without checking if style exists first.
This adds a null check around the style-dependent operations in the context
lost handler.
Fixes #7022
* refactor: invert if for readability, add changelog entry
- Invert if (this.style) to early return for reduced indentation
- Add changelog entry for the bug fix
---------
Co-authored-by: Kai Gritun <kai@kaigritun.com>
* chore(deps-dev): bump devtools-protocol from 0.0.1580600 to 0.0.1581282 (#7102)
Bumps [devtools-protocol](https://github.com/ChromeDevTools/devtools-protocol) from 0.0.1580600 to 0.0.1581282.
- [Commits](ChromeDevTools/devtools-protocol@v0.0.1580600...v0.0.1581282)
---
updated-dependencies:
- dependency-name: devtools-protocol
dependency-version: 0.0.1581282
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump puppeteer from 24.37.1 to 24.37.2 (#7100)
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 24.37.1 to 24.37.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](puppeteer/puppeteer@puppeteer-v24.37.1...puppeteer-v24.37.2)
---
updated-dependencies:
- dependency-name: puppeteer
dependency-version: 24.37.2
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump typedoc-plugin-markdown from 4.9.0 to 4.10.0 (#7101)
Bumps [typedoc-plugin-markdown](https://github.com/typedoc2md/typedoc-plugin-markdown/tree/HEAD/packages/typedoc-plugin-markdown) from 4.9.0 to 4.10.0.
- [Release notes](https://github.com/typedoc2md/typedoc-plugin-markdown/releases)
- [Changelog](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/packages/typedoc-plugin-markdown/CHANGELOG.md)
- [Commits](https://github.com/typedoc2md/typedoc-plugin-markdown/commits/typedoc-plugin-markdown@4.10.0/packages/typedoc-plugin-markdown)
---
updated-dependencies:
- dependency-name: typedoc-plugin-markdown
dependency-version: 4.10.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* reimplement using the observer pattern
* Apply suggestion from @CommanderStorm
* Apply suggestion from @CommanderStorm
* Apply suggestion from @CommanderStorm
* Apply suggestion from @CommanderStorm
* remove the strip plugin
* fix imports
* fix naming
* make the design more consistently named
* integrate witht the documentation subsystem
* Fix which items are exported for the docs
* make the example more pretty
* Apply suggestion from @CommanderStorm
* fix linting errors
* fix tests
* add a testcase
* simplify the LivecyclePerformanceObserver
* make the naming clearer
* add a marking observer
* fix import
* increase magic sourcemap number ????
* add more testcases
* expose the marking observer
* Update src/util/performance_observer/observer.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update test/examples/display-performance-metrics.html
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update test/examples/display-performance-metrics.html
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update test/examples/display-performance-metrics.html
* add a changelog entry
* implement in terms of the higher overhead event system
* Apply suggestions from code review
Co-authored-by: Frank Elsinga <frank@elsinga.de>
* simplify the metrics example
* Apply suggestion from @CommanderStorm
* Apply suggestion from @CommanderStorm
* simplify example
* Apply suggestion from @CommanderStorm
* Apply suggestions from code review
Co-authored-by: Frank Elsinga <frank@elsinga.de>
* Update typedoc.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove the now unnessary @rollup/plugin-strip
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kai Gritun <kaigritun@gmail.com>
Co-authored-by: Kai Gritun <kai@kaigritun.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent a12309c commit 9c6ea6c
13 files changed
Lines changed: 107 additions & 188 deletions
File tree
- build
- docs/assets/examples
- src
- source
- ui
- util
- test/examples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
687 | 686 | | |
688 | 687 | | |
689 | 688 | | |
690 | | - | |
691 | | - | |
692 | 689 | | |
693 | 690 | | |
694 | 691 | | |
| |||
3678 | 3675 | | |
3679 | 3676 | | |
3680 | 3677 | | |
3681 | | - | |
3682 | 3678 | | |
3683 | 3679 | | |
3684 | 3680 | | |
| |||
3707 | 3703 | | |
3708 | 3704 | | |
3709 | 3705 | | |
3710 | | - | |
3711 | 3706 | | |
3712 | 3707 | | |
3713 | 3708 | | |
| |||
3772 | 3767 | | |
3773 | 3768 | | |
3774 | 3769 | | |
3775 | | - | |
3776 | | - | |
3777 | 3770 | | |
3778 | 3771 | | |
3779 | 3772 | | |
| |||
3795 | 3788 | | |
3796 | 3789 | | |
3797 | 3790 | | |
3798 | | - | |
3799 | 3791 | | |
3800 | 3792 | | |
3801 | 3793 | | |
| |||
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments