> If I understand correctly, firstPaint from getStartupInfo will tell me when > the first paint of the window occured. > > But since I'm operating in a document (I'm working on about:support > document), I'm looking for the firstPaint of the document, not the whole > browser window. > > So, what I'm looking for is something like "performance.timing.firstPaint" > for each document. > > Am I missing something?
Ah, in that case, yes, firstPaint is definitely not what you want. You're right - it's recording the time that the first top-level window is painted. > One hour of reading DXR later and I *think* I want to get the timestamp of > this: > https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#3809 > > or something around it :) > > > as this will tell me a couple of things: > > 1) Things injected into DOM after this timestamp may/will cause reflow. > 2) Things injected into DOM before this timestamp are unlikely to cause FOUC > 3) If I change any code in ContentSink, HTMLParser, or if I'll inject a > MutationObserver that will be catching nodes as the Parser feeds the DOM and > modifying them, I should see this timestamp being affected and in result > performance being impacted. > > Does it sound like what I'm looking for? > > zb. Possibly? It certainly looks like that'll get you the time before we start a paint. Can you point me to the test you've written so far? That might help me to better understand what you're attempting to measure and how you're going about it. -Mike On 22/07/2016 8:47 PM, zbranie...@mozilla.com wrote: > On Friday, July 22, 2016 at 6:53:45 AM UTC-7, Mike Conley wrote: >> Is the firstPaint timestamp in nsIAppStartup's getStartupInfo[1] not >> sufficient? It's apparently recording the time that firstPaint occurred. >> I think you're already aware of this, but I'm in the process of >> modifying ts_paint to record the delta between the firstPaint timestamp >> and the process start timestamp in bug 1287938. >> >> If it's not sufficient, I'd like to understand why. > > If I understand correctly, firstPaint from getStartupInfo will tell me when > the first paint of the window occured. > > But since I'm operating in a document (I'm working on about:support > document), I'm looking for the firstPaint of the document, not the whole > browser window. > > So, what I'm looking for is something like "performance.timing.firstPaint" > for each document. > > Am I missing something? > > >> >> As for MozAfterPaint firing all over the place - you might find this >> useful: >> https://groups.google.com/forum/#!searchin/mozilla.dev.platform/MozAfterPaint/mozilla.dev.platform/pCLwWdYc_GY/j9A-vWm3AgAJ >> >> See the second example I wrote in >> https://developer.mozilla.org/en-US/docs/Web/Events/MozAfterPaint#Example >> >> Is any of that helpful? > > That seems helpful! > > If I understand correctly, I can take the transaction Id at DOMContentLoaded > (or DOMInteractive?) and assume that the first paint with the transaction ID > higher than that is the paint that flashed the document. > > Then, if my code modifies DOM after that paint, I will reflow/flash. > > Is that a correct assumption? > > zb. > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform