Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dense image maps #2098

Merged
merged 10 commits into from
Apr 30, 2024
Merged

Dense image maps #2098

merged 10 commits into from
Apr 30, 2024

Conversation

TimSylvester
Copy link
Collaborator

Is this still worthwhile for negligible performance effect, apparently within the margin of error?

before:

| SF zoom in   | 3.62 ms | 6.32 ms |
| SF zoom out  | 1.81 ms | 6.58 ms |
| DC zoom in   | 4.03 ms | 6.43 ms |
| DC zoom out  | 2.23 ms | 7.87 ms |
| AMS zoom in  | 3.40 ms | 5.35 ms |
| AMS zoom out | 1.98 ms | 7.82 ms |
| HEL zoom in  | 3.24 ms | 5.04 ms |
| HEL zoom out | 2.06 ms | 8.33 ms |
| AYA zoom in  | 2.83 ms | 4.62 ms |
| AYA zoom out | 1.78 ms | 5.89 ms |
| BER zoom in  | 3.05 ms | 4.83 ms |
| BER zoom out | 2.10 ms | 8.35 ms |
| BAN zoom in  | 3.18 ms | 5.61 ms |
| BAN zoom out | 2.09 ms | 6.76 ms |
| SHA zoom in  | 1.40 ms | 3.57 ms |
| SHA zoom out | 1.95 ms | 8.12 ms |
Average frame encoding time: 2.55 ms
Average frame rendering time: 6.34 ms
| SF zoom in   | 3.67 ms | 6.42 ms |
| SF zoom out  | 1.94 ms | 6.66 ms |
| DC zoom in   | 3.80 ms | 6.23 ms |
| DC zoom out  | 2.01 ms | 8.17 ms |
| AMS zoom in  | 3.26 ms | 5.13 ms |
| AMS zoom out | 1.93 ms | 8.14 ms |
| HEL zoom in  | 3.04 ms | 4.98 ms |
| HEL zoom out | 2.04 ms | 8.30 ms |
| AYA zoom in  | 2.73 ms | 4.79 ms |
| AYA zoom out | 1.65 ms | 5.84 ms |
| BER zoom in  | 3.83 ms | 5.52 ms |
| BER zoom out | 2.20 ms | 8.40 ms |
| BAN zoom in  | 3.25 ms | 5.68 ms |
| BAN zoom out | 2.08 ms | 6.89 ms |
| SHA zoom in  | 1.89 ms | 5.18 ms |
| SHA zoom out | 2.19 ms | 8.51 ms |
Average frame encoding time: 2.59 ms
Average frame rendering time: 6.55 ms

after:

| SF zoom in   | 3.64 ms | 6.26 ms |
| SF zoom out  | 1.90 ms | 6.62 ms |
| DC zoom in   | 3.91 ms | 6.38 ms |
| DC zoom out  | 2.31 ms | 8.14 ms |
| AMS zoom in  | 3.32 ms | 5.11 ms |
| AMS zoom out | 2.08 ms | 8.14 ms |
| HEL zoom in  | 3.29 ms | 5.01 ms |
| HEL zoom out | 2.01 ms | 8.24 ms |
| AYA zoom in  | 2.72 ms | 4.62 ms |
| AYA zoom out | 1.76 ms | 5.80 ms |
| BER zoom in  | 3.76 ms | 5.49 ms |
| BER zoom out | 2.19 ms | 8.31 ms |
| BAN zoom in  | 3.27 ms | 5.69 ms |
| BAN zoom out | 2.03 ms | 6.85 ms |
| SHA zoom in  | 1.43 ms | 4.14 ms |
| SHA zoom out | 1.91 ms | 8.28 ms |
Average frame encoding time: 2.59 ms
Average frame rendering time: 6.44 ms
| SF zoom in   | 3.61 ms | 6.37 ms |
| SF zoom out  | 1.89 ms | 6.68 ms |
| DC zoom in   | 4.00 ms | 6.47 ms |
| DC zoom out  | 2.36 ms | 8.09 ms |
| AMS zoom in  | 3.40 ms | 5.36 ms |
| AMS zoom out | 1.93 ms | 7.94 ms |
| HEL zoom in  | 3.10 ms | 5.02 ms |
| HEL zoom out | 1.98 ms | 8.32 ms |
| AYA zoom in  | 2.65 ms | 4.62 ms |
| AYA zoom out | 1.66 ms | 5.79 ms |
| BER zoom in  | 3.76 ms | 5.45 ms |
| BER zoom out | 2.13 ms | 8.32 ms |
| BAN zoom in  | 3.13 ms | 5.62 ms |
| BAN zoom out | 2.01 ms | 6.75 ms |
| SHA zoom in  | 1.65 ms | 4.31 ms |
| SHA zoom out | 2.02 ms | 8.28 ms |
Average frame encoding time: 2.58 ms
Average frame rendering time: 6.46 ms

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Feb 9, 2024

If it's not too complex and doesn't cause any problems, I'd be inclined to keep it.

Copy link

github-actions bot commented Feb 9, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +36.0Ki  +0.2% +32.0Ki    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2098-compared-to-main.txt

Copy link

github-actions bot commented Feb 9, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%  +328Ki  +0.2% +64.0Ki    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2098-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +20% +23.7Mi  +407% +24.3Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2098-compared-to-legacy.txt

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 59.85%. Comparing base (d302e6b) to head (69d062f).
Report is 1 commits behind head on main.

Files Patch % Lines
src/mbgl/renderer/image_atlas.cpp 36.36% 0 Missing and 7 partials ⚠️
src/mbgl/renderer/image_manager.cpp 0.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2098      +/-   ##
==========================================
- Coverage   59.97%   59.85%   -0.13%     
==========================================
  Files         580      580              
  Lines       28530    28537       +7     
  Branches    11093    11108      +15     
==========================================
- Hits        17112    17081      -31     
- Misses       4074     4228     +154     
+ Partials     7344     7228     -116     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TimSylvester TimSylvester marked this pull request as ready for review February 15, 2024 15:34
@TimSylvester
Copy link
Collaborator Author

Updating the metric expectation has resolved the build issue, as long as we're okay with the metrics being dependent on implementation-defined behavior.

@TimSylvester
Copy link
Collaborator Author

The coverage results seem to include a ton of partial hits that don't make much sense.

It seems to consider anywhere that a destructor calls delete (which is safe to call with null) to contain an un-taken branch, but most of those are un-reachable because the thing being deleted was allocated with throwing new. Similarly, un-failed assertions count as a missing branch, but I don't think we want to test-hit all the assertions even if we can do so without killing the test processes.

image image image

The results would be more useful without all that noise, and we could potentially exclude assertions from being compiled in when doing coverage, but it doesn't seem likely there's any way to exclude skipped deletes.

Copy link

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            +0.0040         +0.0045             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-2098-compared-to-main.txt

@louwers louwers merged commit efaea41 into main Apr 30, 2024
35 of 36 checks passed
@louwers louwers deleted the dense-image-maps branch April 30, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants