hyperfiddle-2020 icon indicating copy to clipboard operation
hyperfiddle-2020 copied to clipboard

Optimize REPL startup time

Open dustingetz opened this issue 5 years ago • 2 comments

Huge number of problems related to this causing various timeouts, made worse by Zoom video processing. Tag this issue with future changes here.

dustingetz avatar Jul 13 '20 21:07 dustingetz

Previously https://github.com/hyperfiddle/hyperfiddle-app/commit/3b5cae5bcdb74ae0f32f5108740884d4c43d8a6b

dustingetz avatar Jul 13 '20 23:07 dustingetz

Dustin Getz I attempted to repair the damage to repl startup time today and rewrote the entrypoint. I am not sure if I got it right https://github.com/hyperfiddle/hyperfiddle-app/blob/master/src/user.clj#L17-L19 lifted the future up to user https://github.com/hyperfiddle/hyperfiddle-app/blob/master/src/dev.clj dev is therefore allowed to have heavy requires, they will resolve in a thread Thus the nrepl connects basically immediately, a couple seconds or something 6:02 PM Did I get it right

6:12 PM GT yeah certainly looks optimized, good if it helps 6:12 PM lots of implementation details 6:15 PM what would be really good to do is adding something to enable agents/processes to call each other and be able to wait on the result 6:15 PM producing a promise from an agent call should do it 6:16 PM then you can explicitly do things like opening the server socket first and then start building assets with the subtasks 6:20 PM you can hold the incoming requests while it’s building and/or start the app with a JS module that gets a promise for while Shadow is building 6:20 PM so you can download everything else first, and show animations meanwhile etcetc

dustingetz avatar Jul 13 '20 23:07 dustingetz