Open Bug 1557378 Opened 5 years ago Updated 4 months ago

Investigate linking softokn/freebl/nss thingies directly into libxul or use readahead to make actual nss initialization cheaper

Categories

(Core :: Security: PSM, enhancement, P3)

enhancement

Tracking

()

Performance Impact medium
Tracking Status
firefox69 --- affected

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?

Flags: needinfo?(dkeeler)
Type: defect → enhancement

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.

Flags: needinfo?(dkeeler)
Priority: -- → P3
Whiteboard: [fxperf:p2] [fxperfsize:L] → [fxperf:p2] [fxperfsize:L][psm-backlog]
Performance Impact: --- → P2
Keywords: perf:startup
Whiteboard: [fxperf:p2] [fxperfsize:L][psm-backlog] → [fxperfsize:L][psm-backlog]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.