{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4840","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4840/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4840/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4840/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4840","id":132753471,"number":4840,"title":"Typing time is too long to be normal","user":{"login":"fantoine","id":1149128,"avatar_url":"https://avatars.githubusercontent.com/u/1149128?v=3","gravatar_id":"","url":"https://api.github.com/users/fantoine","html_url":"https://github.com/fantoine","followers_url":"https://api.github.com/users/fantoine/followers","following_url":"https://api.github.com/users/fantoine/following{/other_user}","gists_url":"https://api.github.com/users/fantoine/gists{/gist_id}","starred_url":"https://api.github.com/users/fantoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fantoine/subscriptions","organizations_url":"https://api.github.com/users/fantoine/orgs","repos_url":"https://api.github.com/users/fantoine/repos","events_url":"https://api.github.com/users/fantoine/events{/privacy}","received_events_url":"https://api.github.com/users/fantoine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/milestones/5","html_url":"https://github.com/HaxeFoundation/haxe/milestones/3.3.0-rc1","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/milestones/5/labels","id":586975,"number":5,"title":"3.3.0-rc1","description":"","creator":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":302,"state":"closed","created_at":"2014-03-04T14:22:27Z","updated_at":"2016-06-02T11:49:33Z","due_on":"2016-05-07T22:00:00Z","closed_at":"2016-06-02T11:49:33Z"},"comments":30,"created_at":"2016-02-10T16:43:00Z","updated_at":"2016-06-22T14:09:14Z","closed_at":"2016-03-04T16:36:21Z","body":"Issue imported from [Google Group topic](https://groups.google.com/forum/#!topic/haxelang/116Di6s1_8w).\r\n\r\n---\r\n\r\nThe issue is that I get very long compilation time (especially in the typing part) for a not so-big NodeJs project (10000 LOC for 200 files).\r\n\r\nI get those times with haxe 3.2.1:\r\n```\r\nTotal time : 12.440s \r\n------------------------------------ \r\n   filters : 0.060s, 0% \r\n   generate js : 0.050s, 0% \r\n   haxelib : 0.000s, 0% \r\n   macro execution : 2.380s, 19% \r\n   other : 1.780s, 14% \r\n   parsing : 0.210s, 2% \r\n   typing : 7.960s, 64% \r\n```\r\n\r\nAnd those with haxe 3.3.0 (nightly):\r\n```\r\nTotal time : 12.090s\r\n------------------------------------\r\n  analyzer-cleanup : 0.000s, 0%\r\n  analyzer-filter-apply : 0.000s, 0%\r\n  analyzer-from-texpr : 0.040s, 0%\r\n  analyzer-fusion : 0.010s, 0%\r\n  analyzer-to-texpr : 0.010s, 0%\r\n  filters : 0.090s, 1%\r\n  generate js : 0.060s, 0%\r\n  haxelib : 0.000s, 0%\r\n  macro execution : 2.770s, 23%\r\n  other : 1.490s, 12%\r\n  parsing : 0.310s, 3%\r\n  typing : 7.310s, 60%\r\n```\r\n\r\nI don't have so much macro which run on the project so I don't think it's related to this.\r\nThe bad part is that I can't reproduce the error on a small project...\r\n\r\n---\r\n\r\nAs I also mentioned in the topic, could it be possible to get some `@:macroTimes` meta to add to macro methods and then get informations about their execution.\r\n\r\nI easily imagine something like this:\r\n\r\n```haxe\r\nclass Macro {\r\n    @:macroTimes('mymacro')\r\n    public static macro function foo() { /* whatever */ } \r\n}\r\n```\r\n\r\nAnd get stats when using `--times` option:\r\n```\r\nTotal time : 12.090s\r\n------------------------------------\r\n  analyzer-cleanup : 0.000s, 0%\r\n  analyzer-filter-apply : 0.000s, 0%\r\n  analyzer-from-texpr : 0.040s, 0%\r\n  analyzer-fusion : 0.010s, 0%\r\n  analyzer-to-texpr : 0.010s, 0%\r\n  filters : 0.090s, 1%\r\n  generate js : 0.060s, 0%\r\n  haxelib : 0.000s, 0%\r\n  macro execution : 2.770s, 23%\r\n  other : 1.490s, 12%\r\n  parsing : 0.310s, 3%\r\n  typing : 7.310s, 60%\r\n  *mymacro : 0.000s, 0% (0 calls)*\r\n```"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/227755346","html_url":"https://github.com/HaxeFoundation/haxe/issues/4840#issuecomment-227755346","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4840","id":227755346,"user":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T14:09:14Z","updated_at":"2016-06-22T14:09:14Z","body":"Please open another issue with if possible a reproducible example"}}
{"actor":{"display_login":"ncannasse"}}