w3c / server-timing

Server Timing
http://w3c.github.io/server-timing/
Other
75 stars 20 forks source link

Rendering bug in the spec #5

Closed paulirish closed 7 years ago

paulirish commented 7 years ago

Not sure if this is a respec bug or not, but something looks messed:

image

Can reproduce on both these URLs:

igrigorik commented 7 years ago

Doh. Looks like respec runtime is breaking due to a... newline. /cc @marcoscaceres

@plehegar I can't seem to push to the repo; any chance you could check my permissions?

marcoscaceres commented 7 years ago

@igrigorik I'm on it! I switched to off-main-thread syntax highlighting recently, and clearly I missed something.

marcoscaceres commented 7 years ago

Ok, there are some other markup issues ... fixing those. @igrigorik, will also add ABNF syntax highlight support to ReSpec ✨

igrigorik commented 7 years ago

Yay, thanks Marcos!

On Feb 7, 2017 6:29 PM, "Marcos Cáceres" notifications@github.com wrote:

Ok, there are some other markup issues ... fixing those. @igrigorik https://github.com/igrigorik, will also add ABNF syntax highlight support to ReSpec ✨

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WICG/server-timing/issues/5#issuecomment-278210987, or mute the thread https://github.com/notifications/unsubscribe-auth/AAApnH-9HFCwRSeGZlDFPYUZJgBwqmvCks5raSiNgaJpZM4L6NIn .

marcoscaceres commented 7 years ago

Ok, so immediate issues appear to be fixed. Will send a PR with updated markup for this spec.

marcoscaceres commented 7 years ago

Actually, there is still a bug...

screenshot 2017-02-08 20 08 49

😔 ... will fix soon.

marcoscaceres commented 7 years ago

Ah, no! the ">" are in the markup. It's all good :)

varemenos commented 7 years ago

Not sure if this is related but there is an issue with the strong tag and the preceding space of the textNode after the strong tag screen shot 2017-02-08 at 13 59 32

marcoscaceres commented 7 years ago

@paulirish, really big ask, but any chance you could give me some recommendations for getting rid of the FOUC from ReSpec? I've tried various things (and have made significant gains - like the references are in IndexedDB, so I don't hit the network for those anymore on second load, and syntax highlighting is done off main-thread, etc.), but haven't quite got it to a point I'm happy super with.

@igrigorik, same for you, ReSpec is using preload and dns-preconnect in various places already. But if you have any further perf recommendations, I'm all ears. Would like to make it even faster. I'm going to move markdown processing off main-thread also, which hopefully help a bit.

marcoscaceres commented 7 years ago

@varemenos, thanks! Will look into that too.

igrigorik commented 7 years ago

@marcoscaceres the respec script include is async.. so it's a race between when that becomes available and the browser rendering the (unprocessed) HTML markup. To eliminate the race...

The latter delays rendering, but removing FOUC is a win in my books..

marcoscaceres commented 7 years ago

@igrigorik, ok, will do as you suggested: will set body.hidden=true as early as possible in processing. Then after done, will show the final doc.

Testing it locally quickly, it does yield significantly less ugliness - the FOUC is much less extreme (and way less thrashing). Probably good enough for now 👍

marcoscaceres commented 7 years ago

@igrigorik, about the ABNF issue above... maybe turn off syntax highlighting (remove the "abnf" from the "```abnf")... it turned out to be less useful/pretty than I had originally hoped.

marcoscaceres commented 7 years ago

@igrigorik ok, I made your recommended changes to ReSpec (FOUC is gone!). Document is now hidden during generation. For markdown documents like this one, I suggest removing the "async" keyword from the scrip tag. That will get rid of the FOUC on this document too.

I will then continue to move some other things off main thread, reduce payload size, and lazy load some other things in parallel. Gradually, performance should get significantly better over the next year.

igrigorik commented 7 years ago

@marcoscaceres 👍 .. I'll tackle the ABNF stuff in separate commit. Closing this.