-
Notifications
You must be signed in to change notification settings - Fork 20
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
Flatten sourcemaps lazily when serving #68
Comments
I just upgraded what I could figure out to upgrade in the ractive project with the hopes of being able to use source maps again. Seems to be working better, though occasionally still end up looking at:
if debugger breaks early in the loading. I bring this up because I don't know if this would be a more regular thing if they were loaded lazily, or whether this would solve the issue. EDIT: Sourcemaps still don't have any legs. They work for about 5-10 minutes, then nothing but above. But then if fiddle with new browser tab or gobble restart, works again for a little while. |
I suppose you'd be more likely to hit 'please wait a bit', but the total time (from invalidation to sourcemapped debugging) would be the same or less, so I reckon it's a net plus.
That's weird, even by the Twilight Zone-esque standards of this stuff. It might possibly because of something else I've noticed (or rather, my long-suffering colleagues have complained about) - sometimes if you reload the page while a build is happening, you get half a build, when you should get the 'gobbling' page. Haven't had a chance to try and reliably reproduce it though. Does that sound plausible? |
No, don't get a gobble page, everything builds and runs fine, it just doesn't load the sourcemaps. Easiest way is to turn Pause on all Exceptions on, then run a specific unit test in ractive where there's an error in the called ractive code. I suspect it may have to do with chrome too and how it caches things. |
Wow, no that doesn't look good at all. Is that something that only happens after the task has been running a while? How big is the .map file? |
oh, take a look at the trailing "livereload" requests. They don't exist on the one that works |
Only 2.1 minutes? Don't know what you're complaining about... Are there steps you can take to reliably get it into a broken state? Or is it just a case of continually changing source files until something snaps? |
well that's my time hanging out with debugger paused. so it gives me opportunity to get coffee or have smoke in the mean time 😉
usually I'm running a single test in single test file - so I'm repetitively doing that. Once it's borked, I have to create a new tab in chrome (or turn off source maps and use ractive-legacy directly) |
oh, maybe we're hitting chrome's 6 max connections. how are you serving the static files? |
Crudely. Should probably be streaming, for one thing. I'd assumed that there wasn't a problem with max connections though, because I'm sure it's served more than 6 files simultaneously in the past - I could be wrong though |
I'm down with bare metal http. :) Just an idea that maybe there not being "close" somehow or otherwise hand-shaking with chrome on this - because it's EXACTLY the seventh thing (not counting the already served .html file). Let me try removing the |
I'm experiencing the same thing. So Chrome can't ingest a sourcemap while the debugger is paused? That seems totally nuts. Anyway, I've implemented lazy sourcemaps (#71) and it seems to be working - doesn't do anything for the debugger issue though. |
Would it make more sense to not combine the sourcemaps into one uber file but rather serve them independently? |
When I first started tinkering around with this stuff I assumed that browsers would be smart enough to handle multiple levels of sourcemaps, but they're not - if |
As mentioned here, it'd be great if the sourcemap flattening process happened in the background when gobble is serving. Rather than proactively searching all the built files to see if they have sourcemap chains that need flattening, gobble could wait for a request from the browser and do it then, which would provide a nice boost to perceived speed with sacrificing any of that sourcemappy goodness.
For
gobble watch
andgobble build
it would still need to be proactive though.The text was updated successfully, but these errors were encountered: