{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/28118","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/28118/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/28118/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/28118/events","html_url":"https://github.com/JuliaLang/julia/pull/28118","id":341180436,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNDE2NTE3","number":28118,"title":"WIP: generate precompile as part of build process","user":{"login":"KristofferC","id":1282691,"node_id":"MDQ6VXNlcjEyODI2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282691?v=4","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"labels":[{"id":944193805,"node_id":"MDU6TGFiZWw5NDQxOTM4MDU=","url":"https://api.github.com/repos/JuliaLang/julia/labels/latency","name":"latency","color":"76e8d8","default":false},{"id":240125929,"node_id":"MDU6TGFiZWwyNDAxMjU5Mjk=","url":"https://api.github.com/repos/JuliaLang/julia/labels/precompile","name":"precompile","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2018-07-13T22:48:51Z","updated_at":"2018-07-27T14:10:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/28118","html_url":"https://github.com/JuliaLang/julia/pull/28118","diff_url":"https://github.com/JuliaLang/julia/pull/28118.diff","patch_url":"https://github.com/JuliaLang/julia/pull/28118.patch"},"body":"This is a WIP towards fixing https://github.com/JuliaLang/julia/issues/26503. I got inspired on working on it when doing this manually gave such big benefit (https://github.com/JuliaLang/julia/pull/28075).\r\n\r\nSo what this does is that a part of building the release build, julia is started with a (new) flag that emits precompile statements to STDOUT, a fake REPL (copy pasted from the REPL test code) is spun up, and commands from a file are fed into that REPL. The recorded precompile statements are then stored in a file that the `precompile.jl` file includes. The sysimg is then rebuilt with those precompile statements.\r\n\r\nThings TODO:\r\n\r\n* ~The test REPL uses a `FakeTerminal` while the real REPL uses a `TTY`. This means that a lot of the precompile statements that depend on the Terminal are not applicable.~ Search and replace `FakeTerminals.FakeTerminal` for `REPL.Terminals.TTYTerminal` works well enough...\r\n* ~This now builds the sysimg twice on `make`. Annoying for development. Not sure how it is best to only do this when you want to make a real release.~\r\n* ~I know almost nothing about Makefile so everything here is just from looking at the surrounding code. Help appreciated.~\r\n* ~This doesn't manage to record everything that the manual version does. We can see what it misses:~ **Update**: fixed.\r\n\r\n\r\nBut after running this, startup of julia goes from 0.4s to 0.2s on my computer and first command in the REPL is instant etc. We could also record e.g. the status output for Pkg to make that quick if we want to."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/408430281","html_url":"https://github.com/JuliaLang/julia/pull/28118#issuecomment-408430281","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/28118","id":408430281,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODQzMDI4MQ==","user":{"login":"KristofferC","id":1282691,"node_id":"MDQ6VXNlcjEyODI2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282691?v=4","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T14:10:42Z","updated_at":"2018-07-27T14:10:42Z","author_association":"CONTRIBUTOR","body":"Worked around #28308 by not using `mktempdir(::Function)`. Straight flush again :)"}}
{"actor":{"display_login":"KristofferC"}}