many CryptoTasks could probably use the stream transport service instead of creating threads
Categories
(Core :: Security: PSM, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: keeler, Assigned: keeler)
References
Details
(Whiteboard: [psm-assigned])
Attachments
(1 file)
See the conversation in bug 1555557. Basically, for most CryptoTask
s in PSM, we can probably use the stream transport service as an event target rather than creating new threads every which-where.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
CryptoTask is a helper class that makes it easier to implement code that runs on
a background thread and then notifies completion on the main thread (this is
useful for not blocking the main thread with long-running cryptography or I/O).
Before this patch, each CryptoTask would create a new thread each time it ran,
which was inefficient. This patch updates CryptoTask to use the stream transport
service (which is essentially a pool of threads for doing exactly these kinds of
things and notably is not to be confused with the socket transport service) to
run each task. Additionally, there were a few places in PSM where we
unnecessarily created new threads to perform similar tasks. These now use the
stream transport service as well.
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/840986a64dbf avoid creating transient threads in PSM (particularly CryptoTask) r=KevinJacobs
Comment 3•5 years ago
|
||
bugherder |
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/af5896622716 Port bug 1555854 - adapt to change in signature of CryptoTask::Dispatch; rs=bustage-fix
Comment 5•5 years ago
|
||
Thanks a lot for taking care of this, Dana!
Description
•