{"action":"created","issue":{"url":"https://api.github.com/repos/apiaryio/drafter/issues/308","repository_url":"https://api.github.com/repos/apiaryio/drafter","labels_url":"https://api.github.com/repos/apiaryio/drafter/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/drafter/issues/308/comments","events_url":"https://api.github.com/repos/apiaryio/drafter/issues/308/events","html_url":"https://github.com/apiaryio/drafter/issues/308","id":151371243,"number":308,"title":"Speedup drafter.js parsing","user":{"login":"Art4","id":2162994,"avatar_url":"https://avatars.githubusercontent.com/u/2162994?v=3","gravatar_id":"","url":"https://api.github.com/users/Art4","html_url":"https://github.com/Art4","followers_url":"https://api.github.com/users/Art4/followers","following_url":"https://api.github.com/users/Art4/following{/other_user}","gists_url":"https://api.github.com/users/Art4/gists{/gist_id}","starred_url":"https://api.github.com/users/Art4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Art4/subscriptions","organizations_url":"https://api.github.com/users/Art4/orgs","repos_url":"https://api.github.com/users/Art4/repos","events_url":"https://api.github.com/users/Art4/events{/privacy}","received_events_url":"https://api.github.com/users/Art4/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apiaryio/drafter/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-04-27T12:19:11Z","updated_at":"2016-07-04T14:43:12Z","closed_at":null,"body":"Drafter.js needs extremly much time to parse multiple-nested data in objects. I've build a simple API Blueprint file to demonstrate the problem:\r\n\r\n```md\r\nFORMAT: 1A\r\nHOST: https://example.com\r\n\r\n# Test API\r\n\r\ndescription\r\n\r\n# Group Test\r\n\r\n## Error Test [/test/error]\r\n\r\n### Retrieve an error [GET]\r\n+ Response 200\r\n\r\n    + Attributes\r\n\r\n        + data (object)\r\n            + attributes (object)\r\n                + key1: `value` (string) - A string\r\n                + key2: `value` (string) - A string\r\n                + key3: `value` (string) - A string\r\n                + key4: `value` (string) - A string\r\n                + key5: `value` (string) - A string\r\n                + key6: `value` (string) - A string\r\n                + key7: `value` (string) - A string\r\n                + key8: `value` (string) - A string\r\n                + key9: `value` (string) - A string\r\n                + key10: `value` (string) - A string\r\n                + key11: `value` (string) - A string\r\n                + key12: `value` (string) - A string\r\n                + key13: `value` (string) - A string\r\n                + key14: `value` (string) - A string\r\n                + key15: `value` (string) - A string\r\n                + key16: `value` (string) - A string\r\n                + key17: `value` (string) - A string\r\n                + key18: `value` (string) - A string\r\n                + key19: `value` (string) - A string\r\n                + key20: `value` (string) - A string\r\n```\r\n\r\nDrafter.js needs up to 2 minutes on my machine to parse this file. If you add more endpoints for listing, POST, PUT, and so on, the parsing process needs an incredible long time.\r\n\r\nAny ideas how to speed up the parsing?"},"comment":{"url":"https://api.github.com/repos/apiaryio/drafter/issues/comments/230305789","html_url":"https://github.com/apiaryio/drafter/issues/308#issuecomment-230305789","issue_url":"https://api.github.com/repos/apiaryio/drafter/issues/308","id":230305789,"user":{"login":"Art4","id":2162994,"avatar_url":"https://avatars.githubusercontent.com/u/2162994?v=3","gravatar_id":"","url":"https://api.github.com/users/Art4","html_url":"https://github.com/Art4","followers_url":"https://api.github.com/users/Art4/followers","following_url":"https://api.github.com/users/Art4/following{/other_user}","gists_url":"https://api.github.com/users/Art4/gists{/gist_id}","starred_url":"https://api.github.com/users/Art4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Art4/subscriptions","organizations_url":"https://api.github.com/users/Art4/orgs","repos_url":"https://api.github.com/users/Art4/repos","events_url":"https://api.github.com/users/Art4/events{/privacy}","received_events_url":"https://api.github.com/users/Art4/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T14:43:12Z","updated_at":"2016-07-04T14:43:12Z","body":"Thanks, `npm install` works again.\r\n\r\nBut I get an error if I use it:\r\n\r\n```\r\n$ ./node_modules/drakov/drakov -f ./apiary.apib -p 3000\r\n[INFO] No configuration files found\r\n[INFO] Loading configuration from CLI\r\n   DRAKOV STARTED\r\n[...]\\node_modules\\drakov\\node_modules\\drafter.js\\lib\\drafter.nomem.js:1\r\naughtException\",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Mod\r\n                                                                    ^\r\nTypeError: undefined is not a function\r\n    at Pointer_stringify ([...]\\node_modules\\drakov\\node_modules\\drafter.js\\lib\\drafter.nomem.js:1:13675)\r\n    at Object.Module.parse ([...]\\node_modules\\drakov\\node_modules\\drafter.js\\lib\\drafter.nomem.js:20:7616)\r\n    at [...]\\node_modules\\drakov\\lib\\parse\\blueprint.js:13:17\r\n    at [...]\\node_modules\\drakov\\node_modules\\async\\lib\\async.js:718:13\r\n    at iterate ([...]\\node_modules\\drakov\\node_modules\\async\\lib\\async.js:262:13)\r\n    at async.forEachOfSeries.async.eachOfSeries ([...]\\node_modules\\drakov\\node_modules\\async\\lib\\async.js:281:9)\r\n    at _parallel ([...]\\node_modules\\drakov\\node_modules\\async\\lib\\async.js:717:9)\r\n    at Object.async.series ([...]\\node_modules\\drakov\\node_modules\\async\\lib\\async.js:739:9)\r\n    at [...]\\node_modules\\drakov\\lib\\middleware\\route-map.js:23:15\r\n    at f ([...]\\node_modules\\drakov\\node_modules\\glob\\node_modules\\once\\once.js:17:25)\r\n```\r\n\r\nI cannot determine if this is a problem with drafter.js or drakov."}}
{"actor":{"display_login":"Art4"}}