{"action":"created","issue":{"url":"https://api.github.com/repos/polyml/polyml/issues/69","repository_url":"https://api.github.com/repos/polyml/polyml","labels_url":"https://api.github.com/repos/polyml/polyml/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/polyml/polyml/issues/69/comments","events_url":"https://api.github.com/repos/polyml/polyml/issues/69/events","html_url":"https://github.com/polyml/polyml/issues/69","id":188681238,"number":69,"title":"Dramatic slowdowns compared to 5.6","user":{"login":"mn200","id":145647,"avatar_url":"https://avatars.githubusercontent.com/u/145647?v=3","gravatar_id":"","url":"https://api.github.com/users/mn200","html_url":"https://github.com/mn200","followers_url":"https://api.github.com/users/mn200/followers","following_url":"https://api.github.com/users/mn200/following{/other_user}","gists_url":"https://api.github.com/users/mn200/gists{/gist_id}","starred_url":"https://api.github.com/users/mn200/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mn200/subscriptions","organizations_url":"https://api.github.com/users/mn200/orgs","repos_url":"https://api.github.com/users/mn200/repos","events_url":"https://api.github.com/users/mn200/events{/privacy}","received_events_url":"https://api.github.com/users/mn200/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-11T04:11:58Z","updated_at":"2016-11-13T14:50:04Z","closed_at":null,"body":"Most recently tested against 9d84e44, but we've been observing this for a while.\r\n\r\nWhen running our standard CI tests for HOL4, we're seeing dramatic slowdowns on execution of the system. See the timing figures at https://travis-ci.org/HOL-Theorem-Prover/HOL/builds/174934897 where sub-builds 7, 8 and 10 are all doing the same thing.  One is vanilla 5.6, one is 5.6 installed as root, and the last is pulling from GitHub to get the most recent commit.   (There is a factor of 4 involved.) \r\n\r\nLooking at where the problems arise, I'd guess that the issue may be compile-time in some part of our kernel rather than execution.  What was once very fast is turning into an 11 minute compile time. \r\n\r\nOnce the relevant bits of code are stashed in a heap, the execution times look quite reasonable.  The following is effectively the sequence of `use` calls being made:\r\n\r\n```\r\nlocal val dir = OS.FileSys.getDir()\r\nval _ = OS.FileSys.chDir \"/Users/nor190/HOL/tools-poly\";\r\nval _ = use \"poly/poly-init2.ML\";\r\nval _ = OS.FileSys.chDir dir in end;\r\nuse \"/Users/nor190/HOL/src/prekernel/locn.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/locn.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Feedback.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/HOLPP.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UTF8.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UTF8.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/HOLPP.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/Arbnumcore.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/Arbnumcore.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/Arbnum.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/Arbnum.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/Portable.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/MD5.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/MD5.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/Susp.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/Susp.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/poly/MLSYSPortable.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/Portable.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Globals.sig\";\r\nuse \"/Users/nor190/HOL/sigobj/Systeml.sig\";\r\nuse \"/Users/nor190/HOL/sigobj/Systeml.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Globals.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Feedback.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/KernelSig.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/KernelSig.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Dep.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/Redblackmap.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/Redblackmap.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Lib.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Lib.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Dep.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Nonce.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Nonce.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/FinalTag-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/Redblackset.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/Redblackset.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/HOLset.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/HOLset.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/FinalTerm-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/FinalThm-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/FinalType-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Tag.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Tag.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Net-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Subst.sig\";\r\nuse \"/Users/nor190/HOL/src/0/Subst.sml\";\r\nuse \"/Users/nor190/HOL/src/0/KernelTypes.sig\";\r\nuse \"/Users/nor190/HOL/src/0/KernelTypes.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Term.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Lexis.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Lexis.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Type.sig\";\r\nuse \"/Users/nor190/HOL/src/0/Type.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Term.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Thm.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Count.sig\";\r\nuse \"/Users/nor190/HOL/src/prekernel/Count.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Thm.sml\";\r\nuse \"/Users/nor190/HOL/src/0/CoreKernel-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Raw-sig.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Net.sml\";\r\nuse \"/Users/nor190/HOL/src/0/Overlay.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarSpecials.sig\";\r\nuse \"/Users/nor190/HOL/src/postkernel/TheoryDelta.sml\";\r\nuse \"/Users/nor190/HOL/src/postkernel/Theory.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UniversalType.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UniversalType.sml\";\r\nuse \"/Users/nor190/HOL/src/postkernel/TheoryPP.sig\";\r\nuse \"/Users/nor190/HOL/src/postkernel/SharingTables.sig\";\r\nuse \"/Users/nor190/HOL/src/postkernel/SharingTables.sml\";\r\nuse \"/Users/nor190/HOL/src/postkernel/TheoryPP.sml\";\r\nuse \"/Users/nor190/HOL/src/postkernel/Theory.sml\";\r\nuse \"/Users/nor190/HOL/src/postkernel/HolKernel.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/optmonad.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/optmonad.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Coding.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Coding.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarSpecials.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/errormonad.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/errormonad.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Pretype_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/base_tokens.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/base_tokens.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/qbuf.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/MLstring.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/MLstring.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/base_lexer.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/qbuf.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/HOLgrammars.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/TypeNet.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/TypeNet.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/type_grammar_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/type_grammar.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/FunctionalRecordUpdate.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/type_grammar.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/parse_type.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/type_tokens.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UnicodeChars.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UnicodeChars.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/type_tokens.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/parse_type.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/typecheck_error.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Pretype.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Pretype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Absyn_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Absyn.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Absyn.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/LVTermNetFunctor.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Overload.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/stmonad.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/stmonad.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Overload.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/seq.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/seq.sml\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/seqmonad.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/monads/seqmonad.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Preterm_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Preterm.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Literal.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Literal.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Preterm.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Parse_supportENV.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_grammar_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_pp_types.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_grammar.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/term_grammar.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/PPBackEnd.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/PPBackEnd.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Parse.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarAncestry.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarAncestry.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarDeltas.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/GrammarDeltas.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/ProvideUnicode.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/ProvideUnicode.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Parse_support.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/Parse_support.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/TermParse.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/parse_term_dtype.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/parse_term.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/term_tokens.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UTF8Set.sig\";\r\nuse \"/Users/nor190/HOL/src/portableML/UTF8Set.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/CharSet.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/CharSet.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_tokens.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/parse_term.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/TermParse.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/smpp.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/smpp.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_pp.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/HOLtokens.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/HOLtokens.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_pp_utils.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/term_pp_utils.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/type_pp.sig\";\r\nuse \"/Users/nor190/HOL/src/parse/type_pp.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/term_pp.sml\";\r\nuse \"/Users/nor190/HOL/src/parse/Parse.sml\";\r\nuse \"/Users/nor190/HOL/src/bool/TexTokenMap.sig\";\r\nuse \"/Users/nor190/HOL/src/bool/TexTokenMap.sml\";\r\n```\r\n\r\nI guess one of those files is causing the issue.  If I find time to isolate the file, I'll let you know which it is. "},"comment":{"url":"https://api.github.com/repos/polyml/polyml/issues/comments/260190652","html_url":"https://github.com/polyml/polyml/issues/69#issuecomment-260190652","issue_url":"https://api.github.com/repos/polyml/polyml/issues/69","id":260190652,"user":{"login":"dcjm","id":1126102,"avatar_url":"https://avatars.githubusercontent.com/u/1126102?v=3","gravatar_id":"","url":"https://api.github.com/users/dcjm","html_url":"https://github.com/dcjm","followers_url":"https://api.github.com/users/dcjm/followers","following_url":"https://api.github.com/users/dcjm/following{/other_user}","gists_url":"https://api.github.com/users/dcjm/gists{/gist_id}","starred_url":"https://api.github.com/users/dcjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcjm/subscriptions","organizations_url":"https://api.github.com/users/dcjm/orgs","repos_url":"https://api.github.com/users/dcjm/repos","events_url":"https://api.github.com/users/dcjm/events{/privacy}","received_events_url":"https://api.github.com/users/dcjm/received_events","type":"User","site_admin":false},"created_at":"2016-11-13T14:50:04Z","updated_at":"2016-11-13T14:50:04Z","body":"Thanks for reducing that to something that I could work with.  The problem is with the register allocation code in MD5.  I can see where the problem is but it will take a bit longer to come up with a fix."}}
{"actor":{"display_login":"dcjm"}}