{"action":"created","issue":{"url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1522","repository_url":"https://api.github.com/repos/xamarin/xamarin-android","labels_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1522/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1522/comments","events_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1522/events","html_url":"https://github.com/xamarin/xamarin-android/pull/1522","id":312451622,"number":1522,"title":"[Xamarin.Android.Build.Tasks] Try to speed up ConvertResourcesCases [WIP]","user":{"login":"dellis1972","id":810617,"avatar_url":"https://avatars3.githubusercontent.com/u/810617?v=4","gravatar_id":"","url":"https://api.github.com/users/dellis1972","html_url":"https://github.com/dellis1972","followers_url":"https://api.github.com/users/dellis1972/followers","following_url":"https://api.github.com/users/dellis1972/following{/other_user}","gists_url":"https://api.github.com/users/dellis1972/gists{/gist_id}","starred_url":"https://api.github.com/users/dellis1972/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dellis1972/subscriptions","organizations_url":"https://api.github.com/users/dellis1972/orgs","repos_url":"https://api.github.com/users/dellis1972/repos","events_url":"https://api.github.com/users/dellis1972/events{/privacy}","received_events_url":"https://api.github.com/users/dellis1972/received_events","type":"User","site_admin":false},"labels":[{"id":445371980,"url":"https://api.github.com/repos/xamarin/xamarin-android/labels/do-not-merge","name":"do-not-merge","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-09T09:10:02Z","updated_at":"2018-04-09T15:45:33Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/1522","html_url":"https://github.com/xamarin/xamarin-android/pull/1522","diff_url":"https://github.com/xamarin/xamarin-android/pull/1522.diff","patch_url":"https://github.com/xamarin/xamarin-android/pull/1522.patch"},"body":"We currently call `ConvertResourcesCases` in three different places. [1], [2], [3]. For the most part they process the same files , over and over and over again. On a large project this is totally a waste of time. If the file has been processed once and not updated then we should not need to process it again.\r\n\r\nSo the only exception here is `GenerateJavaStubs`. The case here is this needs to be done AFTER we have compiled the app.. but we need to replace any instances of `Foo.MyClass` with `<md5hash>.MyClass` which is generated in the java code. So we do still need to process the resource files for the app after the main assembly has been built. \r\n\r\nThat said if we know `UpdateAndroidResgen` has run, then we DONT need to run this again in `_CreateBaseApk`.\r\n\r\nSo this is an attempt to see if we can only process the files which have changed between each of those calls. Alternatively rework the targets so that we only have one call at the right place in the build system (probably as part of the `UpdateAndroidResources`)\r\n\r\nIf this does not work then the next task will be to rework the `AndroidResource.UpdateXmlResources` to NOT use `XDocument` but try to use `XPathDocument` or `XmlReader/Writer` instead since it is a streaming version and should be allot quicker. \r\n\r\n[1] https://github.com/xamarin/xamarin-android/blob/5d64fb4bbad606eb4a3478085db0ca98616f9966/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L1951\r\n[2] https://github.com/xamarin/xamarin-android/blob/5d64fb4bbad606eb4a3478085db0ca98616f9966/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L1436\r\n[3] https://github.com/xamarin/xamarin-android/blob/5d64fb4bbad606eb4a3478085db0ca98616f9966/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L2011"},"comment":{"url":"https://api.github.com/repos/xamarin/xamarin-android/issues/comments/379798260","html_url":"https://github.com/xamarin/xamarin-android/pull/1522#issuecomment-379798260","issue_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1522","id":379798260,"user":{"login":"dellis1972","id":810617,"avatar_url":"https://avatars3.githubusercontent.com/u/810617?v=4","gravatar_id":"","url":"https://api.github.com/users/dellis1972","html_url":"https://github.com/dellis1972","followers_url":"https://api.github.com/users/dellis1972/followers","following_url":"https://api.github.com/users/dellis1972/following{/other_user}","gists_url":"https://api.github.com/users/dellis1972/gists{/gist_id}","starred_url":"https://api.github.com/users/dellis1972/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dellis1972/subscriptions","organizations_url":"https://api.github.com/users/dellis1972/orgs","repos_url":"https://api.github.com/users/dellis1972/repos","events_url":"https://api.github.com/users/dellis1972/events{/privacy}","received_events_url":"https://api.github.com/users/dellis1972/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T15:45:33Z","updated_at":"2018-04-09T15:45:33Z","author_association":"CONTRIBUTOR","body":"`Time Elapsed 00:00:23.40` without the change.\r\n`Time Elapsed 00:00:19.43` with it. \r\n\r\nThis is on a basic Android App which references the support libraries."}}
{"actor":{"display_login":"dellis1972"}}