CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 03:44:20 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/dotnet/android.git
etag: W/"991b069d83abb11dba7a0201162f45c4"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=6oIMx28AnZ%2FWAGkFLYWUuREQ9qudGKkRiR231G%2ByGiW3cMunl%2BxX5V6ukKdoz4hk8eNd28KL%2FJhWdNTx48nZvDaHuZmCs1Jxnn5Abekoiwcg4va4nV2uq%2F4eCApqZYubArSoBYi8YFG%2BjRmAOa7UXj%2FwznVPHBSv3BzwQ9fPi6WkLg8l4usguYR6uQ2JhmJKcFHsJ%2BMxquTXXBytl%2FcZD4hTODnnytXsroYwc%2FmM5rmBzBzdVFtrbLRx1Fjw3%2FEtPed9VwBLA7u43cI5wv1rDQ%3D%3D--nBy0L6tmh4d%2BQVaq--bdOJu%2BVk0lSUbMulzR2XJg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1388337467.1753587859; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 03:44:19 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 03:44:19 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: ACBA:1AFF47:A55222:DC9256:6885A093
[Xamarin.Android.Build.Tasks] combine CheckTargetFrameworks/ResolveAs… · dotnet/android@9081026 · GitHub
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/CheckTargetFrameworks.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit 9081026
[Xamarin.Android.Build.Tasks] combine CheckTargetFrameworks/ResolveAssemblies (#2174)
Context: https://github.com/xamarin/xamarin-android/wiki/Build-Performance-Ideas#monocecil-usage
Context: https://gist.github.com/jonathanpeppers/a207a8828317460239a12a8b0cc918d7
When reviewing how many times we are using Mono.Cecil to open every
assembly, it was happening 9 times!
Unfortunately it is not as easy as just "caching" something, the
simplest approach for now is to start combining functionality that
are in multiple tasks right now.
A simple first example is the `<CheckTargetFrameworks/>` task, which
runs after the `Compile` target and `<ResolveAssemblies/>` task.
`<CheckTargetFrameworks/>` has the job of emitting warnings about
`[assembly: System.Runtime.Versioning.TargetFramework]`. We can
easily do this work in `<ResolveAssemblies/>` as it is already
looping over all the assemblies' custom attributes for other reasons.
Changes to make this happen:
- Removed `<CheckTargetFrameworks/>` and the
`_CheckTargetFrameworks` target, adding the required
`TargetFrameworkVersion` and `ProjectFile` properties to
`<ResolveAssemblies/>`.
- Added a new `ResolveAssemblies.CheckAssemblyAttributes()` method
where we can add to a `switch` statement for new attribute types
in the future as needed.
- Added a dictionary of `api_levels`, and copied over the logic
from `<CheckTargetFrameworks/>`
Before:
105 ms CheckTargetFrameworks 1 calls
188 ms ResolveAssemblies 1 calls
After:
216 ms ResolveAssemblies 1 calls
I timed the `tests/Xamarin.Forms-Performance-Integration` project in
this repository: a build with no changes.
Since `<CheckTargetFrameworks/>` is removed completely, we can avoid
the time it was taking to open every assembly again.
This saves around 77ms.1 parent e153d42 commit 9081026Copy full SHA for 9081026
File tree
Expand file treeCollapse file tree
4 files changed
+51
-94
lines changedFilter options
- src/Xamarin.Android.Build.Tasks
- Tasks
Expand file treeCollapse file tree
4 files changed
+51
-94
lines changedsrc/Xamarin.Android.Build.Tasks/Tasks/CheckTargetFrameworks.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/CheckTargetFrameworks.cs-76Lines changed: 0 additions & 76 deletions
This file was deleted.
src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs+49-7Lines changed: 49 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 |
| |
32 | 38 |
| |
33 | 39 |
| |
| |||
122 | 128 |
| |
123 | 129 |
| |
124 | 130 |
| |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
125 | 139 |
| |
126 | 140 |
| |
127 | 141 |
| |
| |||
149 | 163 |
| |
150 | 164 |
| |
151 | 165 |
| |
| 166 | + | |
152 | 167 |
| |
153 | 168 |
| |
154 | 169 |
| |
| |||
198 | 213 |
| |
199 | 214 |
| |
200 | 215 |
| |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
| 216 | + | |
| 217 | + | |
208 | 218 |
| |
209 | 219 |
| |
210 | 220 |
| |
| |||
245 | 255 |
| |
246 | 256 |
| |
247 | 257 |
| |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
248 | 290 |
| |
249 | 291 |
| |
250 | 292 |
| |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj-1Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
444 | 444 |
| |
445 | 445 |
| |
446 | 446 |
| |
447 |
| - | |
448 | 447 |
| |
449 | 448 |
| |
450 | 449 |
| |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets+2-10Lines changed: 2 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
41 | 40 |
| |
42 | 41 |
| |
43 | 42 |
| |
| |||
487 | 486 |
| |
488 | 487 |
| |
489 | 488 |
| |
490 |
| - | |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
496 |
| - | |
497 |
| - | |
498 | 489 |
| |
499 | 490 |
| |
500 | 491 |
| |
| |||
1891 | 1882 |
| |
1892 | 1883 |
| |
1893 | 1884 |
| |
| 1885 | + | |
| 1886 | + | |
1894 | 1887 |
| |
1895 | 1888 |
| |
1896 | 1889 |
| |
| |||
2143 | 2136 |
| |
2144 | 2137 |
| |
2145 | 2138 |
| |
2146 |
| - | |
2147 | 2139 |
| |
2148 | 2140 |
| |
2149 | 2141 |
| |
|
You can’t perform that action at this time.
0 commit comments