-
Notifications
You must be signed in to change notification settings - Fork 58
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
Haul: Live reload is slow and shows no indication for seconds #1255
Comments
Hey, @pinarol I did some investigation on this issue and I know what's going on here. |
Thanks for the investigation @dratwas !
That sounds good for the near future, for the long term I am curious if there will be some effort to make Haul compilation faster? |
Hey, @pinarol I found what is the cause of long build/rebuild time with Haul. I did some profiling etc and found that we use bundles: {
index: {
entry: withPolyfills( './index.js' ),
+ sourceMap: 'inline',
}
} I think it should be enabled only for dev builds. BTW. We disabled HMR in Haul at this moment but I'm pretty sure we will give a try to Fast Refresh that is already on ReactNative master. |
I tried the inline source maps and it definitely makes live reload faster, although still not as fast as metro. From the moment the file was saved until the green bar appeared on screen I observed:
I remember at some point in my experiments I disabled inline maps for a reason, but I haven't found anything clear in my notes. The one thing I was able to check is that if you enable inline source maps, the debugger gets a duplicate list of source files. They look identical but only one of them shows the original source: |
@mkevins do you remember any other issues with inline source maps? |
There will be always 2 files, one with source map, second without.
You can check the PR here - callstack/haul#626 Another thing is that we need to realize that Haul will never be as fast as the metro. |
@koke 👋
Just what you described, but I chalked that up to Chrome Devtools creating the duplicate (with the |
I understand this might be the reality now, but is there a fundamental reason why that’s true? Given enough time and effort spent on improving performance, wouldn’t it be possible to make haul roughly as fast as metro? |
I will use @zamotany explanation:
|
That makes sense, thanks for the explanation. |
An issue that caught our attention working with Haul was the slowness of the Live Reload. It takes several seconds to see the an indication that it is reloading(the green bar on the top) after I save the file. Total reload takes 6-8secs which is unlikely.
Could we make a root cause analysis about why this could be happening? This is not urgent to solve but we need to have a plan about how to address this one.
Haul test branch: https://github.com/wordpress-mobile/gutenberg-mobile/tree/try/haul-next-plugins
The text was updated successfully, but these errors were encountered: