Investigate linking softokn/freebl/nss thingies directly into libxul or use readahead to make actual nss initialization cheaper
Categories
(Core :: Security: PSM, enhancement, P3)
Tracking
()
People
(Reporter: Gijs, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: main-thread-io, perf, perf:startup, Whiteboard: [fxperfsize:L][psm-backlog])
The profiles in bug 1370516 comment 10 indicate we spend a non-trivial amount of time loading softokn3/freebl3 libraries. Linking those directly into libxul would likely improve things a little because we use readahead and "smart" linking in terms of the order in which things end up in the binary, etc. etc.
If that is difficult, we could still consider using library readahead (perhaps off the main thread) to preload the dlls before we hit the path where we need this code synchronously, to make the jank when Firefox is already up less bad.
Dana, do you know if either / which of these is feasible?
Reporter | ||
Comment 1•5 years ago
|
||
Doug pointed to https://searchfox.org/mozilla-central/rev/153172de0c5bfca31ef861bd8fc0995f44cada6a/toolkit/xre/nsAppRunner.cpp#4376 which is where we do the readahead stuff for other dlls.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
If relevant: Note that support of using a FIPS version of the .so
files supplied by the OS is still an important use case for some Linuxes.
I think freebl might be not too hard to do. I'm not the right person to ask about the NSS build system.
My understanding is we load softoken as a PKCS#11 library, so having that be compiled into libxul wouldn't really work. I imagine we could add it to the readahead list, though.
(In reply to J.C. Jones [:jcj] (he/him) from comment #2)
If relevant: Note that support of using a FIPS version of the
.so
files supplied by the OS is still an important use case for some Linuxes.
Similarly, any system Firefox gets compiled with --use-system-nss
wouldn't benefit from this, but again that's basically just linuxes as far as I know.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•4 months ago
|
Description
•