-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update README.md #20
base: master
Are you sure you want to change the base?
Update README.md #20
Conversation
I'd be extremely surprised if there was any incompatibility between Reitit and wrap-refresh, as long as wrap-refresh is applied as outer middleware, and not per-route. |
I've been doing it like this: (And not using 'reitit middleware' - using entirely ring middleware after converting the reitit router into a ring handler). Thinking out loud, I guess I could alternatively put wrap-refresh inside |
That seems fine. There shouldn't be any interaction point between Reitit and wrap-refresh, as from wrap-refresh's point of view Reitit is a black box, and from Reitit's point of view wrap-refresh may as well not exist. |
Hmm I'm a bit stumped on this currently.
|
If the Another possibility is that your |
The slowdown happens after a number of reloads. However, generally, is it important to avoid having the middleware stack (including in this case wrap-refresh) in a namespace that may be reloaded (i.e. with wrap-reload)? (though in this case as mentioned the pause happens even when I'm not changing any source files, so i'd have thought no reload would be being triggered). I can sense that conceptually that might be an issue; but without full understanding of how it's working I don't know. Currently I'm using a single file & namespace for the whole application. Just now I moved the middleware stack and the server invocation to a separate file & namespace, to find out if that eliminated the pauses, but it didn't; they slightly increased. This isn't a critical issue at this immediate point, so what I may do next on this is add the code from licht1stein's fork manually, find out if that works, and make sure I understand it, then proceed from there to try to diagnose further. Separately, I wondered if there's a unix process I can check for to check whether multiple watchers are running? |
I've switched to licht1stein's fork, since that's known to be working with Reitit, and I get no 30-40 second pause as before. (Just had to make sure I was injecting the right js file!) (as I pasted the code manually into my project in order to explore it). |
If it happens after a number of reloads, that implies that wrap-refresh is leaking threads or some or resource. Fixing this might be moot, as @licht1stein has an in-progress PR based on their fork that may be ready to merge at some point. |
Don't know if this helps at all.
Really just a reflection of my current understanding.
Thanks :)