-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long tests in ob run #1083
Comments
The tests? Doesn't |
On obelisk's
At some point in history, these tests were relatively quick (and, iirc, only tested routes for sanity). Hot-reloading seems to usually make them faster but ob frequently crashes on hot reloading:
And then the whole testing round is a bit painful. |
I expect that
ob run passing in cmd obelisk/lib/command/src/Obelisk/Command/Run.hs Lines 212 to 221 in 135bfd7
Since this shows up after compilation in your logs, I'm guessing the call to I've noticed before that ghci seems to be faster at evaluation the second time but don't know why.
which seems to imply the first-time-initialization delay on evaluation is smaller after a reload, consistent with your results. So one of these or a combination of them must be slow in your project
Should be easy to narrow down how much 3/4 are contributing, but the others can be trickier.
if that's slow, keep doing That has happened to me when using |
I've suspected the encoder tests were to blame, but only today did I learn about the ghci |
It seems like any choice of encoder takes 5s initially and then 0.01s.
There are not many large enumerations; most of the size in the routes come from persisted data values and use the equivalent of |
Do you also observe the startup slowness when running the backend executable which bypasses the |
the backend executable comes up nearly instantly. |
Actually there seems to be more lazyness going around than I first thought. In the skeleton:
Really not sure where your 5s are coming from. Does only the first 'checkEncoder' in the repl take ~5s or each one independently takes 5s the first time around? If so, maybe the sum of all those is what leads to your slowdown? Could it be possible the backend executable doesn't actually force the check until a page is loaded? Not sure what else actually happens after compiling and before a page load. If the backend executable always reacts instantly and this is |
The first call to |
I'd check whether the frontend executable is also fast when ran under ghc. Maybe try to call Don't really have more ideas. |
FWIW I've noticed that the first-eval delay on ghci (and thus |
Running the tests on
ob run
takes a very long time on our app and it's deleterious on our frontend productivity. Is there a way to skip tests?If there is not, I'm happy to to implement one if someone wants to point me to where it should go.
The text was updated successfully, but these errors were encountered: