{ "id": "147776", "key": "ALOY-1266", "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": "2015-05-13T09:00:49.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "batman", "key": "batman", "displayName": "Bruce Wayne", "active": true, "timeZone": "America/New_York" }, "updated": "2015-05-21T06:30:18.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": [ { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "As pointed out by many resources, including [Effective JavaScript|https://books.google.nl/books?id=nBuA0hmspdMC&lpg=PA55&ots=X1KF5B5wRE&dq=javascript%20indirect%20vs%20direct%20eval%20performance&hl=nl&pg=PA54#v=onepage&q=javascript%20indirect%20vs%20direct%20eval%20performance&f=false] it is better to use {{eval()}} in [indirect mode|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description].\r\n\r\nFor {{$.UI.create}} we are [currently using|https://github.com/appcelerator/alloy/blob/2ed8dc1da24cea4e97aa7ba82d3fd628e22fc820/Alloy/lib/alloy.js#L230] direct {{eval()}}, which can easily be made indirect by replace {{eval}} with {{(0,eval)}}.\r\n\r\nPR on master: https://github.com/appcelerator/alloy/pull/686", "attachment": [], "flagged": false, "summary": "Use indirect eval instead of direct eval", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "master", "comment": { "comments": [ { "id": "353177", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Benchmark shows that direct is fastest, so we should only do this if we agree it's a best practice.\r\n\r\nhttps://gist.github.com/FokkeZB/1cdda90c657d9bf4fb28#file-results-md", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-05-21T06:30:18.000+0000", "updated": "2015-05-21T06:30:18.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }