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
Can we speed up server / "both" imports? #26
Comments
As workaround I tried just comment import of "imports/both/routes.jsx" in "server/main.jsx" (in the development mode), but this didn't increase a reload speed. Is it possible to fast reload code in common "imports" folders, but not required by any server scripts? |
@proxiper, I think the reason this doesn't help is related to meteor/meteor#6576, in that Meteor still processes all those files even if they're not imported. Not 100% sure though. Nevertheless, @ALL, I think we've gotten around this! And even fast client load times. Try this in your
There's a bit of extra debugging info in the server console for this experimental release, that will go away with the final. It does tell you how much extra time was saved on each change though. Would love some report backs especially from Mac and Windows users, to confirm that it works on these platforms. You should see stuff like:
if you don't, it still falls back to the old way. So the new way is only working if you see this message. |
Ssory, I should have mentioned, this release is for Meteor 1.3.1. That's not a "recommended" release by MDG yet, so you need to specify by hand: |
On the first run with @=1.3.1-fast.3 I got this:
But it worked well on the second run. Wow! Now from client folder it reloads even faster then webpack projects! Excellent work! From common folders it's still much slower, but acceptable slower now. Thank you! |
Thanks @proxiper for the detailed feedback. Will figure out why that's happening on the first run. Pity about the common folders speed, I'm going to leave this issue open and see when I have time to delve into performance again... probably we'll have to take a bit more control away from Meteor. Glad at least that it's useable though now. |
Great package... With fast.3, it works but I have the following:
And I don't see the |
Thanks @reel, I think you'll only get that the first load. If you reload Meteor one more time it should all work. all, I know why this is happening... next release will either solve it or at least forego the error message and give instructions to reload Meteor. |
Btw, @proxiper, I noticed that sometimes the first hot reload is a lot slower than consecutive reloads. Could you just confirm in your current project that shared folders take much longer in the 2nd and later reloads? Thanks. |
@gadicc Yes it works. First reload is a bit slower. After, the reload time is +/- 6000ms for subsequent changes... |
Wait, so, 1st reload is extra 6s and 2nd+ is fast? |
New release: Please report if this works for you and what OS you're on! Yet another different approach, stuff happens completely outside of Meteor, so should be even faster and unaffected by speed probs in shared folders. On the downside, harder to maintain, and more error prone, so please help by letting me know if it works, how well it works, and any issues. |
Quick note, in some circumstances the "accelerator" which runs on your meteorPort+2, will survive Meteor exiting (generally if Meteor dies from an unusual error). I think I've fixed this now, will see how things go. If this happens to you (on a new Meteor load you get
Where |
My suspected fix is published in |
I tested gadicc:ecmascript-hot@1.3.1-fast.6 with flow-router-ssr and it works great! Thank you! I have only one small issue: This occurs when the server is restarting due to changes in server methods. But after the restart everything continues to work. I'll try this version in a bigger real project and will give my feedback again. |
Great news! Thanks for reporting back. What OS are you on, btw? Let's track the other issue in #35. |
Closing since I achieved all my aims here ^_^ |
Since #17 we can handle hot loading (on the client) from files that are shared on the client & server, but the latter is a lot slower, e.g. @sammkj in #17 (comment):
This is (probably) because all these shared files need to be processed twice before we can send the update. I think the only way we can solve this is to speed up Meteor (preferred) or bypass Meteor and repeat a lot of the same logic. Will look into this when I have a chance.
The text was updated successfully, but these errors were encountered: