{"action":"closed","issue":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/799","repository_url":"https://api.github.com/repos/android-ndk/ndk","labels_url":"https://api.github.com/repos/android-ndk/ndk/issues/799/labels{/name}","comments_url":"https://api.github.com/repos/android-ndk/ndk/issues/799/comments","events_url":"https://api.github.com/repos/android-ndk/ndk/issues/799/events","html_url":"https://github.com/android-ndk/ndk/issues/799","id":362695798,"node_id":"MDU6SXNzdWUzNjI2OTU3OTg=","number":799,"title":"Performance regression in r18 with ndk-build inside makefiles themselves","user":{"login":"b-spencer","id":8192579,"node_id":"MDQ6VXNlcjgxOTI1Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/8192579?v=4","gravatar_id":"","url":"https://api.github.com/users/b-spencer","html_url":"https://github.com/b-spencer","followers_url":"https://api.github.com/users/b-spencer/followers","following_url":"https://api.github.com/users/b-spencer/following{/other_user}","gists_url":"https://api.github.com/users/b-spencer/gists{/gist_id}","starred_url":"https://api.github.com/users/b-spencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-spencer/subscriptions","organizations_url":"https://api.github.com/users/b-spencer/orgs","repos_url":"https://api.github.com/users/b-spencer/repos","events_url":"https://api.github.com/users/b-spencer/events{/privacy}","received_events_url":"https://api.github.com/users/b-spencer/received_events","type":"User","site_admin":false},"labels":[{"id":551709436,"node_id":"MDU6TGFiZWw1NTE3MDk0MzY=","url":"https://api.github.com/repos/android-ndk/ndk/labels/ndk-build","name":"ndk-build","color":"bfdadc","default":false}],"state":"closed","locked":false,"assignee":{"login":"DanAlbert","id":315852,"node_id":"MDQ6VXNlcjMxNTg1Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/315852?v=4","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"assignees":[{"login":"DanAlbert","id":315852,"node_id":"MDQ6VXNlcjMxNTg1Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/315852?v=4","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/android-ndk/ndk/milestones/17","html_url":"https://github.com/android-ndk/ndk/milestone/17","labels_url":"https://api.github.com/repos/android-ndk/ndk/milestones/17/labels","id":3691765,"node_id":"MDk6TWlsZXN0b25lMzY5MTc2NQ==","number":17,"title":"r18b","description":"","creator":{"login":"DanAlbert","id":315852,"node_id":"MDQ6VXNlcjMxNTg1Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/315852?v=4","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2018-09-26T23:50:20Z","updated_at":"2018-10-04T23:04:50Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2018-09-21T16:43:36Z","updated_at":"2018-10-04T23:04:50Z","closed_at":"2018-10-04T23:04:49Z","author_association":"NONE","body":"#### Description\r\n\r\nWhen upgrading from r16b to r18, I'm experiencing a significant performance regression with `ndk-build` when doing even `ndk-build clean` (or a anything else).  One example:\r\n\r\n`ndk-build -j16 clean` time for r16b: 0m1.070s\r\n`ndk-build -j16 clean` time for r18: **1m21.414s**\r\n\r\nYes, that's an increase of 80 seconds. :)  This project only takes 70 seconds to compile in r16b.\r\n\r\nThe time is all spent executing expressions inside the setup of `make`.  It appears that the changes for [`f99eb9f`](https://android.googlesource.com/platform/ndk.git/+/f99eb9f1751dd85ff15a6f960bec7cb89aac3273^!/#F2) (JSON Compilation Database support) are the source of the problem, even though I am taking no actions to enable or use this feature.\r\n\r\nIt seems that `make` is spending a lot of time executing the highly recursive (and probably slow) `generate-list-file` sequence for thousands of targets.  By simply commenting out three lines in `definitions.mk`, the performance regression disappears (and the build seems to work):\r\n\r\nhttps://android.googlesource.com/platform/ndk.git/+/ndk-release-r18/build/core/definitions.mk#1509\r\nhttps://android.googlesource.com/platform/ndk.git/+/ndk-release-r18/build/core/definitions.mk#1526\r\nhttps://android.googlesource.com/platform/ndk.git/+/ndk-release-r18/build/core/definitions.mk#1527\r\n\r\n`ndk-build -j16 clean` time for r18 with these lines commented out: 0m1.288s\r\n\r\nThe first commented-out line is the most important and gives the largest benefit.  Perhaps this feature and thus these expansions can, at the very least, be enabled only when the JSON Compilation Database is requested?\r\n\r\n#### Environment Details\r\n\r\n* NDK Version: 18.0.5002713\r\n* Build system: ndk-build\r\n* Host OS: Linux x86_64 Debian Stretch\r\n* Compiler: clang\r\n* ABI: android-19\r\n* STL: libc++\r\n"}}
{"actor":{"display_login":"DanAlbert"}}