Closed Bug 1534603 Opened 6 years ago Closed 5 years ago

There is still main thread IO done to blocklist.xml during startup

Categories

(Toolkit :: Blocklist Implementation, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: florian, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [fxperf:p3])

See this startup profile captured on yesterday's nightly: https://perfht.ml/2EP5doE

This is a result of the nsFileChannel issue that affects fetch() as well, in bug 1527712.

We could switch to using OS.File but then we'd have to do the XML parsing ourselves, on the main thread.

It seems to me fixing bug 1527712 and/or completing the switch to kinto would be preferable here.

Depends on: 1527712

(In reply to :Gijs (he/him) from comment #1)

We could switch to using OS.File but then we'd have to do the XML parsing ourselves, on the main thread.

... and make sure we don't actually use OS.File before browser firstpaint.

Depends on: 1534712
No longer depends on: 1534712

We don't have great options here, AFAICT, and bug 1527712 is getting some traction, so let's not prio this too highly.

Priority: -- → P3
Whiteboard: [fxperf] → [fxperf:p3]

Florian, how much is left here with bug 1527712 fixed?

Flags: needinfo?(florian)

(In reply to :Gijs (he/him) from comment #4)

Florian, how much is left here with bug 1527712 fixed?

We still stat blocklist.xml during startup: https://perfht.ml/2K6clTs

The stack is:

NS_ProcessNextEvent(nsIThread *,bool) [xul.dll]
nsThread::ProcessNextEvent(bool,bool *) [xul.dll]
nsresult nsInputStreamReadyEvent::Run() [xul.dll]
nsInputStreamPump::OnInputStreamReady []
nsInputStreamPump::OnStateStart []
nsresult nsInputStreamPump::OnInputStreamReady(class nsIAsyncInputStream *) [xul.dll]
nsBaseChannel::OnStartRequest(nsIRequest *) [xul.dll]
XMLHttpRequestMainThread::OnStartRequest []
nsresult mozilla::dom::XMLHttpRequestMainThread::OnStartRequest(class nsIRequest *) [xul.dll]
mozilla::dom::XMLDocument::StartDocumentLoad(char const *,nsIChannel *,nsILoadGroup *,nsISupports *,nsIStreamListener * *,bool,nsIContentSink *) [xul.dll]
mozilla::dom::Document::StartDocumentLoad(char const *,nsIChannel *,nsILoadGroup *,nsISupports *,nsIStreamListener * *,bool,nsIContentSink *) [xul.dll]
mozilla::dom::Document::RetrieveRelevantHeaders(nsIChannel *) [xul.dll]
nsresult nsLocalFile::GetLastModifiedTime(__int64 *) [xul.dll]
nsLocalFile::ResolveAndStat []
nsresult nsLocalFile::ResolveAndStat() [xul.dll]
static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll]
GetFileAttributesExW [KERNELBASE.dll]

Flags: needinfo?(florian)
Depends on: 1540812

We fixed this by switching away from the XML blocklist.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.