Closed Bug 1555854 Opened 5 years ago Closed 5 years ago

many CryptoTasks could probably use the stream transport service instead of creating threads

Categories

(Core :: Security: PSM, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla69
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 CryptoTasks in PSM, we can probably use the stream transport service as an event target rather than creating new threads every which-where.

Assignee: nobody → dkeeler
Priority: P2 → P1
Whiteboard: [psm-backlog] → [psm-assigned]

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
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
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

Thanks a lot for taking care of this, Dana!

Regressions: 1555392
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: