{ "id": "173579", "key": "ALOY-1685", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2019-05-02T14:25:23.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2020-05-05T11:32:52.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "The \"alloy compile\" command is executed on every incremental build, even if no files change. This takes a huge amount of our total build time on incremental builds.\r\n\r\nImplementing proper incremental build support to only process changed files would be a huge performance gain.", "attachment": [], "flagged": false, "summary": "Improve incremental build times", "creator": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "455355", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is an absolute must have for Alloy to compete with modern app frameworks. We currently spend around 10-15s for each Alloy compile (only the compile, everything else comes on top) - even if no file changed. Alloy should have a simple file watcher that keeps hashes of every file and only compile them if the hash changed. \r\n\r\nThere is even an [open pull request|https://github.com/appcelerator/alloy/pull/927] for this from one year ago but it seems to have been abandoned since then.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-05-05T06:40:12.000+0000", "updated": "2020-05-05T06:41:52.000+0000" }, { "id": "455358", "author": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This can be implemented really easily with code that has been around since the early days of alloy. TiShadow has been using it for a long time to do fast updates. \r\nBasically just use a file watcher and then you can selectively compile alloy files.\r\n\r\nFor example:\r\n{code}\r\nalloy compile -b --platform=ios --config sourcemap=false,file=app/controllers/index.js\r\n{code}\r\n\r\n\r\n(Personally I use tishadow for all development, but you could create an independant alloy watcher module that would do this very easily.)", "updateAuthor": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-05T08:53:10.000+0000", "updated": "2020-05-05T08:53:10.000+0000" }, { "id": "455361", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "The reason that this is not integrated in the CLI build is that we can't fully rely on the usual NodeJS file watchers like chokidar, since a user can CTRL-C out of the build and then no changes would be tracked anymore. Before the user kicks off a new CLI build he may have edited a couple of other files that we are now unaware of so we would have to do a full Alloy build again.\r\n\r\nI tried to address this in https://github.com/appcelerator/alloy/pull/927 but unfortunately i never had the time to finish that. It only watches controllers/views, all other unnecessary processing Alloy does in incremental builds like copying a whole lot of unchanged files around is still happening. The same applies when using the existing {{file}} restriction flag to selectively compile controllers/views.\r\n\r\nIn the meantime we started working on Webpack support, which will address almost all Alloy incremental build issues. It uses an approach similar to TiShadow, in that it will start a server in the background that keeps running Webpack in watch mode, which will make sure to compile changed files in between CLI builds. The new [alloy-loader|https://github.com/appcelerator/alloy-loader] processes changed controllers/views/styles. Webpack makes sure to only process changed files from other folders as well (like {{app/lib}} or {{app/vendor}}). You can expect to see more of this new build pipeline in the next two weeks.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-05-05T11:17:59.000+0000", "updated": "2020-05-05T11:17:59.000+0000" }, { "id": "455362", "author": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great! Thanks.", "updateAuthor": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-05T11:32:52.000+0000", "updated": "2020-05-05T11:32:52.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }